Skip to content

HDDS-12161. Remove code paths for non-Ratis OM in request/response #7845

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

Merged
merged 6 commits into from
Feb 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rename setUpdateID parameter to avoid typos
  • Loading branch information
adoroszlai committed Feb 10, 2025
commit 23a34ab72fee820dfddee590f17ef8c007a2cebe
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public final void setObjectID(long obId) {
* Sets the update ID. For each modification of this object, we will set
* this to a value greater than the current value.
*/
public final void setUpdateID(long updateId) {
public final void setUpdateID(long newValue) {

// Because in non-HA, we have multiple rpc handler threads and
// transactionID is generated in OzoneManagerServerSideTranslatorPB.
Expand All @@ -107,14 +107,15 @@ public final void setUpdateID(long updateId) {
// Main reason, in non-HA transaction Index after restart starts from 0.
// And also because of this same reason we don't do replay checks in non-HA.

if (updateId < this.getUpdateID()) {
final long currentValue = getUpdateID();
if (newValue < currentValue) {
throw new IllegalArgumentException(String.format(
"Trying to set updateID to %d which is not greater than the " +
"current value of %d for %s", updateId, this.getUpdateID(),
"current value of %d for %s", newValue, currentValue,
getObjectInfo()));
}

this.updateID = updateId;
updateID = newValue;
}

/** Hook method, customized in subclasses. */
Expand Down