[
https://issues.apache.org/jira/browse/RATIS-2803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rui Wang updated RATIS-2803:
----------------------------
Description:
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.
> Change GrpcLogAppender.appendEntriesIndex to volatile and drop the readlock
> ---------------------------------------------------------------------------
>
> Key: RATIS-2803
> URL: https://issues.apache.org/jira/browse/RATIS-2803
> Project: Ratis
> Issue Type: Improvement
> Components: server
> Reporter: Rui Wang
> Assignee: Rui Wang
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)