-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Replace AtomicLong to long while ReentrantReadWriteLock is enough #3
Conversation
@killme2008 @fengjiachun PTAL |
I think you are right, 'lastCommittedIndex' does not need to be AtomicLong, ReentrantReadWriteLock is enough, but I think, can you optimize it further? @killme2008 @pifuant PTAL |
Good catch! Yep, AtomicLong is not necessary here, it can be replaced by primitive I agree with @fengjiachun , use |
|
@killme2008 @fengjiachun PTAL |
|
@fengjiachun PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@pifuant tks |
No description provided.