singhpk234 commented on code in PR #3352:
URL: https://github.com/apache/polaris/pull/3352#discussion_r2662960459


##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/JdbcBasePersistenceImpl.java:
##########
@@ -137,6 +139,14 @@ public void writeEntities(
       @Nonnull PolarisCallContext callCtx,
       @Nonnull List<PolarisBaseEntity> entities,
       List<PolarisBaseEntity> originalEntities) {
+    Set<Long> seenEntityIds = new HashSet<>();
+    for (PolarisBaseEntity entity : entities) {
+      if (!seenEntityIds.add(entity.getId())) {
+        throw new RetryOnConcurrencyException(
+            "Multiple updates to entity id '%s' in the same transaction", 
entity.getId());
+      }
+    }

Review Comment:
   precisely :) atleast thats my understanding is, we should group by 
table-uuid collect all the changes and then call commit for individual tables 



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