Skip to content

RATIS-2803. Change GrpcLogAppender.appendEntriesIndex to volatile and drop the readlock - #1684

Merged
amaliujia merged 1 commit into
apache:masterfrom
amaliujia:RATIS-2803
Nov 5, 2026
Merged

amaliujia merged 1 commit into
apache:masterfrom
amaliujia:RATIS-2803

Conversation

@amaliujia

@amaliujia amaliujia commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Change GrpcLogAppender.appendEntriesIndex to volatile and drop the readlock.

We can do it because the getter is only used in testing, and the testing only needs to see the latest written complete value.

This will make the code cleaner.

What is the link to the Apache JIRA

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

How was this patch tested?

Existing tests

@amaliujia

Copy link
Copy Markdown
Contributor Author

@yandrey321 after taking a second look, it seems to me that we can simplify the code a bit.

@yandrey321

Copy link
Copy Markdown
Contributor

+1

@amaliujia
amaliujia merged commit cec6302 into apache:master Nov 5, 2026
17 checks passed
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