smengcl commented on code in PR #4188:
URL: https://github.com/apache/ozone/pull/4188#discussion_r1550044937


##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java:
##########
@@ -1195,7 +1196,8 @@ public OzoneOutputStream createKey(
         .setReplicationConfig(replicationConfig)
         .addAllMetadata(metadata)
         .setAcls(getAclList())
-        .setLatestVersionLocation(getLatestVersionLocation);
+        .setLatestVersionLocation(getLatestVersionLocation)
+        .setOwnerName(ownerName);

Review Comment:
   Actually I wonder if we really need to add this owner field to every single 
new key created in Ozone.
   
   Cons:
   
   1. Arguably we could just leave this as unset (empty) to indicate the 
default behavior, which is to inherit parent's owner. This way we don't bloat 
every single key with this extra owner string in its proto message. This can 
also make `chown` on the bucket/dir non-recursive (much better performance).
   
   2. Also when a cluster is upgraded to a new Ozone version with key ownership 
support, all existing keys would natually have empty owners as well (unless we 
add a lengthy step during OM upgrade to add owner to all existing keys which I 
don't think is the best idea).
   
   Pro:
   
   1. On the other hand I get that the the owner field in key info is required 
for "sticky bit" behavior to work with properly Ranger authorizer (previously 
there is a workaround, HDDS-9701).



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to