Skip to content

Move snapshot data write to async mode. #299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

xiaoxichen
Copy link
Collaborator

In order to provider higher queue depth for disk, which is optimal for scheduler to merge requests.

Also IO and compute(checksum) can parallel.

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 55.10204% with 22 lines in your changes missing coverage. Please review.

Project coverage is 59.73%. Comparing base (1746bcc) to head (9b987c2).
Report is 71 commits behind head on main.

Files with missing lines Patch % Lines
...lib/homestore_backend/snapshot_receive_handler.cpp 55.10% 17 Missing and 5 partials ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #299      +/-   ##
==========================================
- Coverage   63.15%   59.73%   -3.42%     
==========================================
  Files          32       33       +1     
  Lines        1900     3055    +1155     
  Branches      204      364     +160     
==========================================
+ Hits         1200     1825     +625     
- Misses        600     1034     +434     
- Partials      100      196      +96     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xiaoxichen xiaoxichen requested review from yuwmao and koujl May 15, 2025 06:18
err ? err.message() : "nil");
}
}
std::unique_lock< std::shared_mutex > lock(mutex);
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems should be

std::unique_lock< std::shared_mutex > lock(ctx_->progress_lock);

@yuwmao
Copy link
Contributor

yuwmao commented May 15, 2025

If a blob batch returns an error due to ALLOC_BLK_ERR, the async_write might still be in progress.
Then when the retry batch with the same blobs comes, is there any problem? Seems no correctness issue due to the duplication handling but could have some space waste(the previous write might not be committed in indexservice when second write happens)?

In order to provider higher queue depth for disk, which is optimal
for scheduler to merge requests.

Also IO and compute(checksum) can parallel.

Signed-off-by: Xiaoxi Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants