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


##########
paimon-core/src/main/java/org/apache/paimon/table/format/FormatTableCommit.java:
##########
@@ -203,6 +207,8 @@ public void commit(List<CommitMessage> commitMessages) {
                 }
             }
 
+            List<Partition> validatedPartitions = 
rejectWritesToCustomLocationPartitions(messages);

Review Comment:
   **[P1] Make the default-location ownership check atomic with registration.** 
This is only a preflight: after it returns, a concurrent `ADD PARTITION ... 
LOCATION` can register one of the affected specs before the writer publishes 
and calls `createPartitions` with no location assertion. Because 
`ignoreIfExists` is true, registration succeeds against the now-custom 
partition and its statistics may be attached to that partition even though the 
new files were published under the default path, making the committed rows 
invisible. Please pass a position-aligned all-null `partitionLocations` list 
for these preflighted default-owned specs so the server rejects an intervening 
custom owner (and abort removes the published files), and cover the 
interleaving with a latch-based test.



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