Skip to content

HDDS-15100. Add an OM config to toggle Ozone snapshot rename feature#10156

Draft
smengcl wants to merge 1 commit intoapache:masterfrom
smengcl:HDDS-15100-ss-rename-toggle
Draft

HDDS-15100. Add an OM config to toggle Ozone snapshot rename feature#10156
smengcl wants to merge 1 commit intoapache:masterfrom
smengcl:HDDS-15100-ss-rename-toggle

Conversation

@smengcl
Copy link
Copy Markdown
Contributor

@smengcl smengcl commented Apr 28, 2026

What changes were proposed in this pull request?

So far Ozone snapshot rename feature is buggy (see HDDS-11384) and we would like to have a config to disable this feature on Ozone Manager so it wouldn't be misused. AFAIK snapshot rename requires snapshot to fully transition to id-based to be truly safe to do.

For now, we should at least put it behind a config and disable that by default.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-15100

How was this patch tested?

  • Snapshot rename request unit test is added
  • CLI integration test case is added

@smengcl smengcl added the snapshot https://issues.apache.org/jira/browse/HDDS-6517 label Apr 28, 2026
Copy link
Copy Markdown
Contributor

@priyeshkaratha priyeshkaratha left a comment

Choose a reason for hiding this comment

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

Thanks @smengcl for the patch. Changes overall LGTM. There is an issue with testcase, please check the inline comment.

OMException omException = assertThrows(OMException.class,
() -> doPreExecute(omRequest));
assertEquals(FEATURE_NOT_ENABLED, omException.getResult());
assertEquals("Ozone snapshot rename feature is not allowed per Ozone Manager server config",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

exception message mismatch. OMSnapshotRenameRequest throws the new FEATURE_NOT_ENABLED exception with a trailing period, but the new tests assert the message without it.

@jojochuang jojochuang requested a review from sadanand48 April 29, 2026 19:20
Copy link
Copy Markdown
Contributor

@jojochuang jojochuang left a comment

Choose a reason for hiding this comment

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

lgtm except Priyesh's comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

snapshot https://issues.apache.org/jira/browse/HDDS-6517

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants