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


##########
paimon-core/src/test/java/org/apache/paimon/rest/RESTCatalogServer.java:
##########
@@ -2777,6 +2779,12 @@ private MockResponse commitSnapshot(
         if (!tableId.equals(table.catalogEnvironment().uuid())) {
             throw new Catalog.TableNotExistException(identifier);
         }
+        TableSnapshot currentSnapshot = 
tableLatestSnapshotStore.get(identifier.getFullName());
+        String currentSnapshotUuid =
+                currentSnapshot == null ? null : 
currentSnapshot.snapshot().uuid();
+        if (!Objects.equals(currentSnapshotUuid, baseSnapshotUuid)) {

Review Comment:
   Thanks for checking this. baseSnapshotUuid is nullable because there may be 
no base snapshot, or the base may be a legacy snapshot without a UUID; it is 
not intended to make UUID validation optional once the current snapshot has a 
UUID. Supporting legacy clients during a mixed-version rollout is a server-side 
compatibility policy: a server that needs that compatibility can accept a 
missing UUID and fall back to its existing snapshot-ID/CAS validation. 
RESTCatalogServer here is a test fixture and intentionally exercises the strict 
post-upgrade contract, so we do not plan to weaken this validation in this 
client/library change.



##########
paimon-core/src/main/java/org/apache/paimon/catalog/Catalog.java:
##########
@@ -739,6 +740,7 @@ default boolean supportsListTableByType() {
     boolean commitSnapshot(
             Identifier identifier,
             @Nullable String tableUuid,
+            @Nullable String baseSnapshotUuid,

Review Comment:
   Thanks. This PR intentionally updates these APIs in the current development 
line; preserving source or binary compatibility for the previous method 
signatures and constructors is not a requirement for this change. We do 
preserve compatibility for persisted legacy snapshots and the REST wire 
representation, but prefer to keep one canonical API instead of adding 
deprecated overloads and default bridges.



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