-
Notifications
You must be signed in to change notification settings - Fork 37
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
Use operation attributes for implicit pre-read and insert mode of Put #2351
Use operation attributes for implicit pre-read and insert mode of Put #2351
Conversation
private boolean implicitPreReadEnabled; | ||
|
||
private boolean insertModeEnabled; |
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.
Removed the flags for implicit pre-read and insert mode. Instead, use the operation attributes for them.
import java.util.Optional; | ||
|
||
/** A class to manage the operations attributes for Consensus Commit. */ | ||
public final class ConsensusCommitOperationAttribute { |
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.
Added ConsensusCommitOperationAttribute
to manage the operations attributes for Consensus Commit.
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.
LGTM! 👍
Put setImplicitPreReadEnabled(boolean implicitPreReadEnabled) { | ||
this.implicitPreReadEnabled = implicitPreReadEnabled; | ||
return this; | ||
return ConsensusCommitOperationAttribute.isImplicitPreReadEnabled(this); |
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.
Just an idea: Moving these operations to ConsensusCommitOperationAttribute
's instance methods and replacing ImmutableMap<String, String> attributes
with ConsensusCommitOperationAttribute attributes
might be an option in the future.
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.
LGTM, thank you!
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.
LGTM! Thank you!
…read-and-insert-mode-of-put
Description
This PR updates the code to use operation attributes (introduced in #2333) for implicit pre-read and insert mode of Put.
Related issues and/or PRs
Changes made
ConsensusCommitOperationAttribute
to manage the operations attributes for Consensus Commit.Checklist
Additional notes (optional)
N/A
Release notes
N/A