GeorgeJahad commented on code in PR #3652:
URL: https://github.com/apache/ozone/pull/3652#discussion_r953098099
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/SnapshotInfo.java:
##########
@@ -71,8 +89,14 @@ public static SnapshotStatus valueOf(SnapshotStatusProto
status) {
"BUG: missing valid SnapshotStatus, found status=" + status);
}
}
- };
+ }
+ public static final String SNAPSHOT_FLAG = "snapshot";
+ private static final String SEPARATOR = "-";
+ private static final long UNDELETED_TIME = -1;
+ private static final String INITIAL_SNAPSHOT_ID =
+ UUID.randomUUID().toString();
Review Comment:
The snapshot name is a part of the key. If the users chooses not to give a
name, then the timestamp based name is generated.
But the only thing that keeps that name unique is that it is checked as a
part of the key during the create:
https://github.com/GeorgeJahad/ozone/blob/HDDS-6853-rebased2/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/snapshot/OMSnapshotCreateRequest.java#L128-L132
So if the user does select a non-timestamped based name, the timestamp one
isn't used and thus isn't checked for uniqueness.
We could add a check for it, but that would require reading the entire
snapshot info table. Neil's PR with the snapshot chain would help with that.
Should we leave this for after that get merged in?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]