swamirishi commented on code in PR #8981:
URL: https://github.com/apache/ozone/pull/8981#discussion_r2323772740
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmSnapshotLocalData.java:
##########
@@ -45,32 +51,33 @@ public abstract class OmSnapshotLocalData {
// Whether SST is filtered
private boolean isSSTFiltered;
- // Map of Table to uncompacted SST file list on snapshot create
- private Map<String, Set<String>> uncompactedSSTFileList;
-
// Time of last compaction, in epoch milliseconds
private long lastCompactionTime;
// Whether the snapshot needs compaction
private boolean needsCompaction;
- // Map of version to compacted SST file list
- // Map<version, Map<Table, sstFileList>>
- private Map<Integer, Map<String, Set<String>>> compactedSSTFileList;
+ private UUID previousSnapshotId;
+
+ // Map of version to VersionMeta, using linkedHashMap since the order of the
map needs to be deterministic for
+ // checksum computation.
+ private final LinkedHashMap<Integer, VersionMeta> versionSstFileInfos;
public static final Charset CHARSET_ENCODING = StandardCharsets.UTF_8;
private static final String DUMMY_CHECKSUM = new String(new byte[64],
CHARSET_ENCODING);
/**
* Creates a OmSnapshotLocalData object with default values.
*/
- public OmSnapshotLocalData(Map<String, Set<String>> uncompactedSSTFileList) {
+ public OmSnapshotLocalData(List<LiveFileMetaData> uncompactedSSTFileList,
UUID previousSnapshotId) {
Review Comment:
yeah the previousSnapshotId in the snapshot chain could be different. Since
we are not updating the previous snapshot version value within the same ratis
txn it is impossible to achieve atomicity when done via ratis when we have an
independent yaml file.
--
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]