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(db/trans-cache): verify cached files with crc32c #5523

Conversation

halibobo1205
Copy link
Contributor

Use CRC32 to catch accidents like disk write errors, etc.

@codecov-commenter
Copy link

codecov-commenter commented Oct 7, 2023

Codecov Report

Merging #5523 (7cea9e0) into release_v4.7.3 (9842b3f) will increase coverage by 0.20%.
Report is 5 commits behind head on release_v4.7.3.
The diff coverage is 82.60%.

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

@@                 Coverage Diff                  @@
##             release_v4.7.3    #5523      +/-   ##
====================================================
+ Coverage             64.99%   65.20%   +0.20%     
- Complexity            10020    10056      +36     
====================================================
  Files                   894      894              
  Lines                 53816    53847      +31     
  Branches               5926     5929       +3     
====================================================
+ Hits                  34979    35112     +133     
+ Misses                16123    16019     -104     
- Partials               2714     2716       +2     
Files Coverage Δ
...ices/http/solidity/SolidityNodeHttpApiService.java 94.11% <100.00%> (+91.08%) ⬆️
...a/org/tron/tool/litefullnode/LiteFullNodeTool.java 75.55% <100.00%> (+0.07%) ⬆️
.../main/java/org/tron/core/db2/common/TxCacheDB.java 84.81% <81.39%> (-0.84%) ⬇️

... and 21 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -288,6 +295,7 @@ private boolean recovery() {
}

private boolean recovery(int index, Path file) {
checkCrc32c(index, file);
Copy link
Contributor

Choose a reason for hiding this comment

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

Has this error happened in tests? Why will it happen? Will some error info printed when this kind of errors be found?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To catch accidents like disk write errors, service crash etc.

Will some error info printed when this kind of errors be found?

Yes, there will be an exception.

@halibobo1205 halibobo1205 merged commit c623940 into tronprotocol:release_v4.7.3 Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants