HDDS-8555. [Snapshot] When snapshot feature is disabled, block OM startup if there are still snapshots in the system #4994
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?
This is a follow-up to HDDS-8166.
As a safety measure, if snapshot feature flag is disabled (
ozone.filesystem.snapshot.enabled == false), block OM from starting up if there are still snapshots in the system (i.e.snapshotInfoTableis not empty).This implies any deleted but not reclaimed snapshots will also block OM start up in this case, by design.
This should prevent issues with OM HA where some OM has
ozone.filesystem.snapshot.enabledset tofalsebut some still have it set totrue. (e.g. if leader has it set totruebut a follower has it set tofalse, when a snapshot request comes in, the follower OM would fail the Tx because the feature is disabled)Related thought: do we have any OM configuration consistency check when an OM joins a quorum?
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-8555
How was this patch tested?