HDDS-14570. SCM should finalize all versions with one Ratis request#9715
Open
sodonnel wants to merge 4 commits intoapache:HDDS-14496-zdufrom
Open
HDDS-14570. SCM should finalize all versions with one Ratis request#9715sodonnel wants to merge 4 commits intoapache:HDDS-14496-zdufrom
sodonnel wants to merge 4 commits intoapache:HDDS-14496-zdufrom
Conversation
yandrey321
reviewed
Feb 12, 2026
| if (firstLv == -1) { | ||
| firstLv = lf.layoutVersion(); | ||
| } | ||
| lastLv = lf.layoutVersion(); |
There was a problem hiding this comment.
should it be inside if (-1 != lf.layoutVersion()) check?
Contributor
Author
There was a problem hiding this comment.
It was intentionally like this, as we want to store the first and last value in the iterator. However I have refactored this a bit in the latest version as we don't actually need the firstLv to be passed through.
yandrey321
reviewed
Feb 12, 2026
| try { | ||
| context.getFinalizationStateManager() | ||
| .finalizeLayoutFeature(lf.layoutVersion()); | ||
| if (firstLv > -1) { |
There was a problem hiding this comment.
should it also check (lastLv > firstLv)?
Contributor
Author
There was a problem hiding this comment.
This code has changed so this is no longer relevant.
Contributor
|
@sodonnel if we are waiting on other changes to go in before this one can we move it to draft? |
cdb7d18 to
c501d9e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Rather than generating a new Ratis request / message for each layout finalized, one message will be generated with the range of layouts to finalize.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14570
How was this patch tested?
Small modification to an existing test. Existing integration tests should ensure the call is replicated, but so far there are not new tests to valid there is only a single Ratis message sent when finalizing across many LVs.