mvanhorn commented on code in PR #11102:
URL: https://github.com/apache/paimon/pull/11102#discussion_r4644866277


##########
paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java:
##########
@@ -364,6 +382,223 @@ public List<ManifestCommittable> 
filterCommitted(List<ManifestCommittable> commi
         }
     }
 
+    @Nullable
+    private ManifestCommittable recoverCompact(ManifestCommittable 
committable) {
+        List<CommitMessage> messages = new ArrayList<>();
+        Set<Path> outputs = new HashSet<>();
+        DataFilePathFactories dataFactories = new 
DataFilePathFactories(pathFactory);
+        IndexFilePathFactories indexFactories = new 
IndexFilePathFactories(pathFactory);
+        for (CommitMessage message : committable.fileCommittables()) {
+            CompactIncrement compact = ((CommitMessageImpl) 
message).compactIncrement();
+            if (compact.isEmpty()) {
+                continue;
+            }
+            messages.add(
+                    new CommitMessageImpl(
+                            message.partition(),
+                            message.bucket(),
+                            message.totalBuckets(),
+                            DataIncrement.emptyIncrement(),
+                            compact,
+                            message.checkFromSnapshot()));

Review Comment:
   Right, the checkArgument in 
SnapshotConflictChecker.prepareCompactionBaselines rejects a v13 message before 
the recovery catch can see it. In the next push, recoverCompact will skip the 
recovered compact phase with a warning when the bucket compaction check is 
enabled and a DV-changing compact message has a null `checkFromSnapshot`, since 
there is no baseline to validate against, and leave its outputs for orphan 
cleanup. Ordinary commits keep the strict checkArgument, and I'll add a test 
that runs the DV recovery fixture with a null `checkFromSnapshot` and asserts 
two fresh committers skip the compact phase instead of failing.
   
   <!-- r:35439cf10f71.7c8f85c21f2b -->



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

Reply via email to