Skip to content

Execute clean indexes in finally#3772

Merged
StevenLuMT merged 1 commit into
apache:masterfrom
gaozhangmin:fix-checkpoint
Apr 7, 2023
Merged

Execute clean indexes in finally#3772
StevenLuMT merged 1 commit into
apache:masterfrom
gaozhangmin:fix-checkpoint

Conversation

@gaozhangmin

Copy link
Copy Markdown
Contributor

Motivation

Fixes #3771

Changes

Move cleanupExecutor to finally block to make sure it can be executed every checkpoint process.

@codecov-commenter

codecov-commenter commented Feb 9, 2023

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 55.55556% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.16%. Comparing base (b85ac48) to head (c65b06d).
⚠️ Report is 580 commits behind head on master.

Files with missing lines Patch % Lines
...ie/storage/ldb/SingleDirectoryDbLedgerStorage.java 55.55% 3 Missing and 1 partial ⚠️

❗ There is a different number of reports uploaded between BASE (b85ac48) and HEAD (c65b06d). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (b85ac48) HEAD (c65b06d)
client 1 0
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3772      +/-   ##
============================================
- Coverage     68.07%   60.16%   -7.92%     
+ Complexity     6648     5754     -894     
============================================
  Files           467      467              
  Lines         40829    40829              
  Branches       5234     5234              
============================================
- Hits          27795    24564    -3231     
- Misses        10772    14047    +3275     
+ Partials       2262     2218      -44     
Flag Coverage Δ
bookie 39.79% <55.55%> (-0.08%) ⬇️
client ?
remaining 29.41% <0.00%> (-0.05%) ⬇️
replication 41.42% <55.55%> (+0.03%) ⬆️
tls 21.09% <0.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hangc0276 hangc0276 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's the difference between moving the code block into finally?

@StevenLuMT StevenLuMT left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it doesn't solve the fundamental problem.

@gaozhangmin

gaozhangmin commented Feb 21, 2023

Copy link
Copy Markdown
Contributor Author

What's the difference between moving the code block into finally?

Moved to finally, The index clean up is going on when writeCache.isEmpty().
Which can address the issue i mentioned in #3771, When a bookie transits from readonly to write-read mode. lots of index cleanup would gather @hangc0276 @StevenLuMT

@gaozhangmin
gaozhangmin requested review from StevenLuMT and hangc0276 and removed request for StevenLuMT and hangc0276 February 21, 2023 10:59
@gaozhangmin

Copy link
Copy Markdown
Contributor Author

@hangc0276 PTAL

@gaozhangmin
gaozhangmin requested review from hangc0276 and removed request for StevenLuMT and hangc0276 March 30, 2023 07:50
@gaozhangmin
gaozhangmin requested a review from StevenLuMT April 3, 2023 09:12

@StevenLuMT StevenLuMT left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

zymap pushed a commit that referenced this pull request Jun 19, 2023
Execute clean indexes in finally (#3772)

(cherry picked from commit 04e572b)
hangc0276 pushed a commit to hangc0276/bookkeeper that referenced this pull request Jun 26, 2023
Execute clean indexes in finally (apache#3772)

(cherry picked from commit 04e572b)
zymap pushed a commit that referenced this pull request Dec 6, 2023
Execute clean indexes in finally (#3772)

(cherry picked from commit 04e572b)
Ghatage pushed a commit to sijie/bookkeeper that referenced this pull request Jul 12, 2024
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.

db-storage-cleanup would impact write request

5 participants