JingsongLi commented on code in PR #11129:
URL: https://github.com/apache/paimon/pull/11129#discussion_r4560975732


##########
paimon-core/src/main/java/org/apache/paimon/operation/WriteRestore.java:
##########
@@ -26,17 +26,24 @@
 
 import java.util.List;
 
-/** Restore for write to restore data files by partition and bucket from file 
system. */
+/** Restores data file metadata and indexes for write initialization. */
 public interface WriteRestore {
 
     long latestCommittedIdentifier(String user);
 
+    /**
+     * Restores the requested metadata for a partition and bucket.
+     *
+     * @param scanDataFileMetas whether to scan data manifests for data file 
metadata and the total
+     *     bucket count. Index restoration is independent of this flag.
+     */
     RestoreFiles restoreFiles(
             BinaryRow partition,
             int bucket,
             boolean scanDynamicBucketIndex,
             boolean scanDeleteVectorsIndex,
-            boolean scanSourceIndexPayloads);
+            boolean scanSourceIndexPayloads,
+            boolean scanDataFileMetas);

Review Comment:
   [P2] Preserve the existing WriteRestore extension method
   
   Replacing the five-argument method with a new abstract six-argument method 
breaks existing `WriteRestore` implementations supplied through 
`withWriteRestore`, including thin wrappers around the built-in restore. When 
the new `AbstractFileStoreWrite` calls such a precompiled implementation, it 
throws `AbstractMethodError` before restoring the bucket. Existing binaries 
that invoke the former five-argument entry point instead throw 
`NoSuchMethodError`. I reproduced both directions on JDK 8, and confirmed an 
actual downstream compaction wrapper still implements/calls the former 
signature.
   
   Please retain a compatible five-argument entry point and bridge the new 
overload (older implementations can safely keep scanning data metadata), or 
explicitly coordinate the consumer migration before rollout. The 
backward-compatible serialized request field does not cover this Java 
extension-method change.



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