smengcl commented on code in PR #3981:
URL: https://github.com/apache/ozone/pull/3981#discussion_r1035414713


##########
hadoop-hdds/rocksdb-checkpoint-differ/src/main/java/org/apache/ozone/rocksdiff/RocksDBCheckpointDiffer.java:
##########
@@ -560,20 +579,24 @@ public HashSet<String> readRocksDBLiveFiles(String 
dbPathArg) {
   /**
    * Process each line of compaction log text file input and populate the DAG.
    */
-  private synchronized void processCompactionLogLine(String line) {
+  synchronized void processCompactionLogLine(String line) {
 
     LOG.debug("Processing line: {}", line);
 
     if (line.startsWith("#")) {
       // Skip comments
       LOG.debug("Comment line, skipped");
     } else if (line.startsWith(COMPACTION_LOG_SEQNUM_LINE_PREFIX)) {
-      // Read sequence number
-      LOG.debug("Reading sequence number as snapshot generation");
-      final String seqNumStr =
+      // Read sequence number, and snapshot ID
+      LOG.debug("Reading sequence number as snapshot generation, "
+          + "and snapshot ID");
+      final String trimmedStr =
           line.substring(COMPACTION_LOG_SEQNUM_LINE_PREFIX.length()).trim();
+      final Scanner input = new Scanner(trimmedStr);
       // This would the snapshot generation for the nodes to come
-      reconstructionSnapshotGeneration = Long.parseLong(seqNumStr);
+      reconstructionSnapshotGeneration = input.nextLong();
+      // This is the snapshotID assigned to every single CompactionNode to come
+      reconstructionLastSnapshotID = input.nextLine().trim();
     } else if (line.startsWith(COMPACTION_LOG_ENTRY_LINE_PREFIX)) {
       // Read compaction log entry

Review Comment:
   Ah! Good catch. :D



-- 
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]

Reply via email to