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

fix: avoid error when disk cache miss #790

Merged
merged 2 commits into from
Mar 30, 2023
Merged

Conversation

ShiKaiWi
Copy link
Member

Which issue does this PR close?

Closes #769

Rationale for this change

Error will be thrown breaking execution, when data in the disk cache is corrupted, which is unavoidable.

What changes are included in this PR?

  • Report cache miss when cache content is corrupted instead.

Are there any user-facing changes?

None.

How does this change test

The new unit test for it is added.

@codecov-commenter
Copy link

Codecov Report

Merging #790 (b48df6b) into main (72f1701) will increase coverage by 0.00%.
The diff coverage is 83.33%.

❗ Current head b48df6b differs from pull request most recent head 643d1c4. Consider uploading reports for the commit 643d1c4 to get more accurate results

@@           Coverage Diff           @@
##             main     #790   +/-   ##
=======================================
  Coverage   68.28%   68.28%           
=======================================
  Files         295      295           
  Lines       46695    46758   +63     
=======================================
+ Hits        31886    31930   +44     
- Misses      14809    14828   +19     
Impacted Files Coverage Δ
server/src/proxy/grpc/write.rs 34.38% <0.00%> (-0.39%) ⬇️
components/object_store/src/disk_cache.rs 88.08% <94.20%> (+0.73%) ⬆️

... and 5 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@jiacai2050 jiacai2050 left a comment

Choose a reason for hiding this comment

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

lgtm

@jiacai2050 jiacai2050 added this pull request to the merge queue Mar 30, 2023
Merged via the queue into apache:main with commit ce0561d Mar 30, 2023
chunshao90 pushed a commit to chunshao90/ceresdb that referenced this pull request May 15, 2023
* fix: avoid error when disk cache miss

* fix: ignore error when recover and update
@ShiKaiWi ShiKaiWi deleted the fix-769 branch May 29, 2023 08:36
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.

Buffer underflow when executing query
3 participants