Skip to content

HDDS-14570. SCM should finalize all versions with one Ratis request#9715

Open
sodonnel wants to merge 4 commits intoapache:HDDS-14496-zdufrom
sodonnel:HDDS-14570-scm-finalize-one-ratis-call
Open

HDDS-14570. SCM should finalize all versions with one Ratis request#9715
sodonnel wants to merge 4 commits intoapache:HDDS-14496-zdufrom
sodonnel:HDDS-14570-scm-finalize-one-ratis-call

Conversation

@sodonnel
Copy link
Contributor

@sodonnel sodonnel commented Feb 5, 2026

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.

@sodonnel sodonnel requested a review from errose28 February 5, 2026 20:16
@github-actions github-actions bot added the zdu Pull requests for Zero Downtime Upgrade (ZDU) https://issues.apache.org/jira/browse/HDDS-14496 label Feb 6, 2026
if (firstLv == -1) {
firstLv = lf.layoutVersion();
}
lastLv = lf.layoutVersion();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it be inside if (-1 != lf.layoutVersion()) check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

try {
context.getFinalizationStateManager()
.finalizeLayoutFeature(lf.layoutVersion());
if (firstLv > -1) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it also check (lastLv > firstLv)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code has changed so this is no longer relevant.

@errose28
Copy link
Contributor

@sodonnel if we are waiting on other changes to go in before this one can we move it to draft?

@sodonnel sodonnel force-pushed the HDDS-14570-scm-finalize-one-ratis-call branch from cdb7d18 to c501d9e Compare March 4, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

zdu Pull requests for Zero Downtime Upgrade (ZDU) https://issues.apache.org/jira/browse/HDDS-14496

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants