Skip to content
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

feat: write temp buffer before engine enqueue #608

Merged
merged 2 commits into from
Jul 10, 2024
Merged

feat: write temp buffer before engine enqueue #608

merged 2 commits into from
Jul 10, 2024

Conversation

MrCroxx
Copy link
Collaborator

@MrCroxx MrCroxx commented Jul 10, 2024

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

Serialize cache entry to a temporary buffer before enqueue to engine.

This method makes the serialized entry size known before submitting it to the engine, making it possible to decide which engine to use with the serialized entry size.

But this PR may increase some memory usage when the buffer is waiting to be written to the main buffer. Maybe use parallel buffer writing.

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)

#596

@MrCroxx MrCroxx added feature New feature or request refactor labels Jul 10, 2024
@MrCroxx MrCroxx self-assigned this Jul 10, 2024
Copy link

codecov bot commented Jul 10, 2024

Codecov Report

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

Project coverage is 82.70%. Comparing base (8f7baf6) to head (d45d692).

Files Patch % Lines
foyer-storage/src/storage/either.rs 0.00% 9 Missing ⚠️
foyer-storage/src/engine.rs 58.33% 5 Missing ⚠️
foyer-storage/src/small/generic.rs 0.00% 4 Missing ⚠️
foyer-storage/src/store.rs 88.88% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #608      +/-   ##
==========================================
- Coverage   82.76%   82.70%   -0.07%     
==========================================
  Files          62       62              
  Lines        7986     8016      +30     
==========================================
+ Hits         6610     6630      +20     
- Misses       1376     1386      +10     

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

@MrCroxx MrCroxx merged commit 3c15f70 into main Jul 10, 2024
16 checks passed
@MrCroxx MrCroxx deleted the xx/buffer branch July 10, 2024 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request refactor
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant