complete the ctx future if no dirty to unblock cp flush#867
complete the ctx future if no dirty to unblock cp flush#867JacksonYao287 wants to merge 1 commit intoeBay:masterfrom
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #867 +/- ##
==========================================
- Coverage 56.51% 48.40% -8.11%
==========================================
Files 108 110 +2
Lines 10300 12881 +2581
Branches 1402 6184 +4782
==========================================
+ Hits 5821 6235 +414
+ Misses 3894 2548 -1346
- Partials 585 4098 +3513 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| } else { | ||
| CP_PERIODIC_LOG(DEBUG, unmove(cp_ctx->id()), "Btree does not have any dirty buffers to flush"); | ||
| } | ||
| return folly::makeFuture< bool >(true); // nothing to flush |
There was a problem hiding this comment.
when there is no dirty buffers flushing stopped here. the flushing doesn't reach to your change. Please look at my change in #861
shosseinimotlagh
left a comment
There was a problem hiding this comment.
I am not convinced that this bug can lead to cp stuck. It will be great if you may write a simple UT to verify the bug.
1- write in index
2- restart
3- read only
(CP should stuck )
|
@shosseinimotlagh I will try to add a UT for this |
Bug:
when there is no dirty buf in index table (example : all read ops or no ops), if we trigger cp flush, then future in cp_ctx of index will not be completed and then the whole cp_flush is stuck.
Fix:
complete the future in cp_ctx if dirty buf is empty