singhpk234 commented on code in PR #3352:
URL: https://github.com/apache/polaris/pull/3352#discussion_r2662502977
##########
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 this test got stuck :
https://github.com/apache/polaris/blob/main/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisRestCatalogIntegrationBase.java#L1088
i think it more about the implementation of how transaction api is
implemented in Polaris
https://github.com/apache/polaris/blob/4cf09ec77c77e01fc4b375c635b11a9e474b1281/runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java#L1045
if you see we could collect all the changes for one table and then apply
then one shot rather than making then two calls ?
--
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]