yuqi1129 commented on code in PR #14787:
URL: https://github.com/apache/gravitino/pull/14787#discussion_r4512677930


##########
core/src/main/java/org/apache/gravitino/authorization/OwnerManager.java:
##########
@@ -111,6 +111,12 @@ public void setOwner(
               authorizationPlugin.onOwnerSet(metadataObject, 
originOwner.orElse(null), newOwner));
       notifyOwnerChange(originOwner.orElse(null), metalake, metadataObject);
     } catch (NoSuchEntityException nse) {
+      // The object existed when getOwner ran, so it can have been dropped 
since then. Only a
+      // live owner proves that; otherwise keep reporting that either side may 
be missing.
+      if (ownerExists(metalake, ownerName, ownerType)) {

Review Comment:
   Added the comment in 8b9efe031429d8c6659a66677566234a9bc81f15. It now 
explicitly calls the owner-exists check a heuristic: if the owner is also 
removed between the failure and this check, the generic `NotFoundException` is 
preserved and table creation can still fail in that narrow race. I also 
recorded this in the PR's Known limits.
   
   The follow-up is comment-only. All 19 filtered tests in `TestOwnerManager` 
and `TestTableHookDispatcher` passed, along with scoped Spotless checks.
   



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