Skip to content

RATIS-2434. Regression test for data race between SegmentedRaftLog.get() and LogSegment.append().#1378

Merged
szetszwo merged 1 commit intoapache:masterfrom
jojochuang:RATIS-2434
Mar 14, 2026
Merged

RATIS-2434. Regression test for data race between SegmentedRaftLog.get() and LogSegment.append().#1378
szetszwo merged 1 commit intoapache:masterfrom
jojochuang:RATIS-2434

Conversation

@jojochuang
Copy link
Contributor

Generated-by: Gemini CLI + Gemini 2.5 Pro

What changes were proposed in this pull request?

  • Add a regression test for RATIS-2282 using code injection helper.
  • Add a javadoc comment in LogSegment to explain that the order of appending to records and cache is critical, because there's no lock to ensure atomicity.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/RATIS-2434

How was this patch tested?

Test code generated by Gemini, reviewed manually. Tests passed.

…t() and LogSegment.append().

Generated-by: Gemini CLI + Gemini 2.5 Pro
@jojochuang
Copy link
Contributor Author

cc @szetszwo

Copy link
Contributor

@szetszwo szetszwo left a comment

Choose a reason for hiding this comment

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

+1 the change looks good.

@szetszwo szetszwo merged commit b069709 into apache:master Mar 14, 2026
16 checks passed
@jojochuang
Copy link
Contributor Author

Thanks @szetszwo !

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