vigneshio commented on code in PR #4795:
URL: https://github.com/apache/polaris/pull/4795#discussion_r3424420842


##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/JdbcBasePersistenceImpl.java:
##########
@@ -1125,7 +1125,7 @@ private boolean handleInheritablePolicy(
       datasourceOperations.execute(connection, updateQuery);
     } else {
       // record doesn't exist do an insert.
-      datasourceOperations.executeUpdate(insertQuery);
+      datasourceOperations.execute(connection, insertQuery);

Review Comment:
   @dimas-b Good point. This PR fixes the rollback issue caused by 
`executeUpdate()` using a separate auto-committing connection. The `SELECT` 
check has been there for a while and would need a connection-scoped 
`executeSelect()` API if we want it to run on the same transaction connection 
as well.
   
   That would be a slightly larger change but I can put together a followup PR 
if you think it's worth addressing..
   



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