Skip to content

Avoid dup-append logs for committing logs #757

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Besroy
Copy link
Contributor

@Besroy Besroy commented Jun 25, 2025

No description provided.

@Besroy Besroy requested review from JacksonYao287 and sanebay June 25, 2025 08:41
@Besroy Besroy changed the title [TEST] for repl dev ut Avoid dup-append logs for committing logs Jun 25, 2025
@Besroy Besroy force-pushed the fix_ut branch 3 times, most recently from 77fb832 to c3cd7be Compare June 26, 2025 05:02
This change avoid the following corner case:
T1: lsn=100 is executing handle_commit
T2: lsn=100 is requested to append from leader again, triggering raft_event and retrieving the existed rreq from map
T3: lsn=100 committed, the rreq is removed from map and is cleared
T4: during the raft_event process, the rreq has already been cleared, preventing further processing
@codecov-commenter
Copy link

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

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 67.42%. Comparing base (1a0cef8) to head (431ac5d).
Report is 220 commits behind head on master.

Files with missing lines Patch % Lines
src/lib/replication/repl_dev/raft_repl_dev.cpp 57.14% 2 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     #757       +/-   ##
===========================================
+ Coverage   56.51%   67.42%   +10.91%     
===========================================
  Files         108      109        +1     
  Lines       10300    12384     +2084     
  Branches     1402     1748      +346     
===========================================
+ Hits         5821     8350     +2529     
+ Misses       3894     3139      -755     
- Partials      585      895      +310     

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

@Besroy Besroy marked this pull request as draft July 2, 2025 03:19
@Besroy
Copy link
Contributor Author

Besroy commented Jul 2, 2025

This pr aims to resole a corner case, but using last_lsn/last_term rather than last_commit_lsn might be more dangerous and requires more consideration, so covert it to raft ATM.

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.

2 participants