-
Notifications
You must be signed in to change notification settings - Fork 408
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
RATIS-2093. Decouple metadata and configuration entries from appendEntries buffer for stateMachineCache' #1096
Conversation
…tries buffer for stateMachineCache
@szetszwo can you have a look? |
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.
@duongkame , thanks for working on this! Please see the comments inlined.
ReferenceCountedObject.wrap(removedStateMachineData)); | ||
} else { | ||
cache.appendEntry(LogSegment.Op.WRITE_CACHE_WITH_STATE_MACHINE_CACHE, | ||
ReferenceCountedObject.wrap(LogProtoUtils.copy(entry))); |
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.
It should copy removedStateMachineData
instead.
// The stateMachineData will be cached inside the StateMachine itself. | ||
cache.appendEntry(LogSegment.Op.WRITE_CACHE_WITH_STATE_MACHINE_CACHE, | ||
ReferenceCountedObject.wrap(removedStateMachineData)); | ||
if ((removedStateMachineData != entry)) { |
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.
There are double parenthesis, i.e. ((...))
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.
+1 the change looks good.
Thanks for merging it @szetszwo . Sorry, I have to ask for another favor, can release a snapshot version after this commit? |
@duongkame , deployed |
What changes were proposed in this pull request?
See RATIS-2093.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/RATIS-2093
How was this patch tested?