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

Add debugging log for index cp. #592

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

Conversation

xiaoxichen
Copy link
Collaborator

No description provided.

@xiaoxichen xiaoxichen requested a review from koujl November 14, 2024 09:56
@codecov-commenter
Copy link

codecov-commenter commented Nov 14, 2024

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

Codecov Report

Attention: Patch coverage is 72.72727% with 9 lines in your changes missing coverage. Please review.

Project coverage is 66.62%. Comparing base (1a0cef8) to head (7ad50df).
Report is 96 commits behind head on master.

Files with missing lines Patch % Lines
src/lib/index/wb_cache.cpp 78.26% 4 Missing and 1 partial ⚠️
src/include/homestore/index/index_table.hpp 55.55% 2 Missing and 2 partials ⚠️

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

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #592       +/-   ##
===========================================
+ Coverage   56.51%   66.62%   +10.10%     
===========================================
  Files         108      109        +1     
  Lines       10300    10774      +474     
  Branches     1402     1473       +71     
===========================================
+ Hits         5821     7178     +1357     
+ Misses       3894     2889     -1005     
- Partials      585      707      +122     

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

src/lib/index/wb_cache.cpp Outdated Show resolved Hide resolved
@@ -89,7 +89,7 @@ void IndexService::start() {
}
// Force taking cp after recovery done. This makes sure that the index table is in consistent state and dirty buffer
// after recovery can be added to dirty list for flushing in the new cp
hs()->cp_mgr().trigger_cp_flush(true /* force */);
hs()->cp_mgr().trigger_cp_flush(true /* force */).wait();
Copy link
Contributor

Choose a reason for hiding this comment

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

trigger_cp_flush(true) waits until cp flush is done. Did you test it without .wait()

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right now all the tests are done without the wait()... I dont know if we do need a wait() but it seems make things easier...

Copy link
Contributor

Choose a reason for hiding this comment

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

wait() will guarantee the cp superblk is written to disk, which further means the last_cp_id is persisted. if this does not do any harm to performance, I think we can wait here, or even all the trigger_cp_flush

@shosseinimotlagh
Copy link
Contributor

@xiaoxichen do you have a plan to merge this pr or close it?

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.

5 participants