Skip to content

Conversation

@yamingk
Copy link
Contributor

@yamingk yamingk commented May 16, 2025

Only impact Solo Repl Dev which enables timer based flush thread:

  • Fixed a race (happens ocasionally) that cancel_timer can finish later than the main fiber which will cause asan issue.

Testing:

Run 100 times for the test case:

for i in {1..100};  do ./Debug/src/tests/test_meta_blk --gtest_filter=VMetaBlkMgrTest.write_to_full_test --use_file=true ; done

Cross tested wit HomeBlocks as well to run 100 times.

@yamingk yamingk changed the title Fix solo repl dev cancel timer race [Solo repl dev] Fix log dev flush timer cancel race May 16, 2025
@yamingk yamingk requested a review from sanebay May 16, 2025 00:26
@codecov-commenter
Copy link

codecov-commenter commented May 16, 2025

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

Codecov Report

Attention: Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 67.23%. Comparing base (1a0cef8) to head (a088645).
Report is 197 commits behind head on master.

Files with missing lines Patch % Lines
src/lib/logstore/log_dev.cpp 91.66% 0 Missing and 1 partial ⚠️

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

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #723       +/-   ##
===========================================
+ Coverage   56.51%   67.23%   +10.71%     
===========================================
  Files         108      109        +1     
  Lines       10300    11984     +1684     
  Branches     1402     1666      +264     
===========================================
+ Hits         5821     8057     +2236     
+ Misses       3894     3093      -801     
- Partials      585      834      +249     

☔ 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.

sanebay
sanebay previously approved these changes May 16, 2025
void LogDev::stop_timer() {
if (m_flush_timer_hdl != iomgr::null_timer_handle) {
iomanager.run_on_forget(logstore_service().flush_thread(), [this]() {
folly::Future< int > LogDev::stop_timer() {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: You can use folly::Unit too.

@yamingk yamingk merged commit 320687b into eBay:master May 17, 2025
21 checks passed
@yamingk yamingk deleted the yk_timer branch May 17, 2025 14:24
hkadayam pushed a commit to hkadayam/HomeStore that referenced this pull request Aug 7, 2025
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.

4 participants