amaliujia commented on code in PR #11716:
URL: https://github.com/apache/ozone/pull/11716#discussion_r4609905917
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMAllocateBlockRequest.java:
##########
@@ -123,6 +121,23 @@ public OMRequest preExecute(OzoneManager ozoneManager)
throws IOException {
resolveBucketAndCheckOpenKeyAcls(newKeyArgs.build(), ozoneManager,
ACLType.WRITE, allocateBlockRequest.getClientID());
+ // An older client does not send the storage policy in allocateBlock
requests. Using the bucket policy for them
+ // is wrong when the bucket policy changes while the key is being written.
Review Comment:
Nit: the comment in this two lines read odd.
I am wondering if the following is better
```suggestion
// Older clients, and keys opened without a policy, do not send the
policy in allocateBlock. In such cases,
// use the policy stored on the open key so that a bucket policy change
during the write does not move later blocks to another tier.
```
--
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]