Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@MrCroxx
Copy link
Member

@MrCroxx MrCroxx commented Mar 28, 2025

What's changed and what's your intention?

Please explain IN DETAIL what the changes are in this PR and why they are needed. :D

  • Fix blob/region split condition calculation error.
  • Add ut for the corner case.
  • Refine splitter code.
  • Fix direct fs error log.

Checklist

  • I have written the necessary rustdoc comments
  • I have added the necessary unit tests and integration tests
  • I have passed make all (or make fast instead if the old tests are not modified) in my local environment.

Related issues or PRs (optional)

close #905
risingwavelabs/risingwave#21116
risingwavelabs/risingwave#21157

MrCroxx added 4 commits March 28, 2025 00:42
Signed-off-by: MrCroxx <[email protected]>
Signed-off-by: MrCroxx <[email protected]>
- Fix blob/region split condition calculation error.
- Add ut for the corner case.
- Refine splitter code.
- Fix direct fs error log.

Signed-off-by: MrCroxx <[email protected]>
@MrCroxx MrCroxx self-assigned this Mar 28, 2025
@MrCroxx MrCroxx added the bug Something isn't working label Mar 28, 2025
@MrCroxx MrCroxx added this to the v0.15 milestone Mar 28, 2025
@codecov
Copy link

codecov bot commented Mar 28, 2025

Codecov Report

Attention: Patch coverage is 89.40397% with 16 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
foyer-storage/src/large/flusher.rs 55.17% 13 Missing ⚠️
foyer-storage/src/device/direct_fs.rs 33.33% 2 Missing ⚠️
foyer-storage/src/large/buffer.rs 98.91% 1 Missing ⚠️
Files with missing lines Coverage Δ
foyer-storage/src/large/generic.rs 86.38% <100.00%> (+0.42%) ⬆️
foyer-storage/src/large/buffer.rs 96.44% <98.91%> (+0.07%) ⬆️
foyer-storage/src/device/direct_fs.rs 87.97% <33.33%> (+0.86%) ⬆️
foyer-storage/src/large/flusher.rs 83.69% <55.17%> (-1.70%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a blob/region split condition calculation error and refines the logging and splitting logic while adding tests for a corner case.

  • Fixes the calculation error by updating how blob and region boundaries are computed.
  • Enhances logging by including a flusher identifier across modules.
  • Refines the splitter algorithm and adjusts error handling in the direct file system module.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
foyer-storage/src/large/generic.rs Passes a flusher id to the asynchronous block and updates flusher invocation.
foyer-storage/src/large/flusher.rs Integrates an id parameter into the flusher constructor and logging entries.
foyer-storage/src/large/buffer.rs Refines the blob/region splitting logic and adjusts buffer handling.
foyer-storage/src/device/direct_fs.rs Revises the capacity check and error logging for IO range validation.
Comments suppressed due to low confidence (1)

foyer-storage/src/device/direct_fs.rs:104

  • The variable 'e' is used in the error log and for returning an error but is not defined in this context. Define an appropriate error value or update the check to avoid referencing an undefined variable.
tracing::error!(region, ?e, "[direct fs]: io range out of region capacity");

@MrCroxx MrCroxx merged commit a00076c into main Mar 28, 2025
35 checks passed
@MrCroxx MrCroxx deleted the xx/fix-split branch March 28, 2025 08:24
HammadB pushed a commit to chroma-core/chroma that referenced this pull request Apr 17, 2025
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
- Fix foyer large object disk cache bug by bumping to the latest
version.
   - FYI: foyer-rs/foyer#912

## Test plan
*How are these changes tested?*

- [x] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes
*Are all docstrings for user-facing APIs updated if required? Do we need
to make documentation changes in the [docs
repository](https://github.com/chroma-core/docs)?*

Signed-off-by: MrCroxx <[email protected]>
Inventrohyder pushed a commit to Inventrohyder/chroma that referenced this pull request Aug 5, 2025
…core#4107)

## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
- Fix foyer large object disk cache bug by bumping to the latest
version.
   - FYI: foyer-rs/foyer#912

## Test plan
*How are these changes tested?*

- [x] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes
*Are all docstrings for user-facing APIs updated if required? Do we need
to make documentation changes in the [docs
repository](https://github.com/chroma-core/docs)?*

Signed-off-by: MrCroxx <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bug: panic on direct fs read not in the same region

2 participants