dimas-b commented on code in PR #1134:
URL: https://github.com/apache/polaris/pull/1134#discussion_r1985823956


##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/transactional/PolarisMetaStoreManagerImpl.java:
##########
@@ -1966,9 +1966,12 @@ private PolarisEntityResolver 
resolveSecurableToRoleGrant(
             },
             Function.identity());
 
+    List<PolarisBaseEntity> loadedTasks = new ArrayList<>();

Review Comment:
   This `loadTasks` method appears to be called only from test code... Is that 
expected?



##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/transactional/PolarisMetaStoreManagerImpl.java:
##########
@@ -1980,11 +1983,22 @@ private PolarisEntityResolver 
resolveSecurableToRoleGrant(
               String.valueOf(
                   
Integer.parseInt(properties.getOrDefault(PolarisTaskConstants.ATTEMPT_COUNT, 
"0"))
                       + 1));
-          task.setEntityVersion(task.getEntityVersion() + 1);
-          
task.setProperties(PolarisObjectMapperUtil.serializeProperties(callCtx, 
properties));
-          ms.writeEntity(callCtx, task, false, originalTask);
+          updatedTask.setProperties(
+              PolarisObjectMapperUtil.serializeProperties(callCtx, 
properties));
+          EntityResult result = updateEntityPropertiesIfNotChanged(callCtx, 
ms, null, updatedTask);

Review Comment:
   Question: why do we need to update task entities in a "load" call?



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