Gargi-jais11 commented on code in PR #12106:
URL: https://github.com/apache/ozone/pull/12106#discussion_r4692377997
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeysDeleteRequest.java:
##########
@@ -248,10 +248,19 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager, Execut
getBucketInfoForUpdate(omMetadataManager, volumeName, bucketName);
Map<String, OmKeyInfo> openKeyInfoMap = new HashMap<>();
+ List<OmKeyInfo> nonEmptyDirs = new ArrayList<>();
Review Comment:
I think it will be better to reject it before finalization, as other
post-ZDU features check isAllowed() on the server?
`recursive=false` is gated only on the client, RpcClient and S3 Gateway use
the lowest OM version, which is pre-ZDU until finalization. The OM itself still
applies the flag unconditionally (`OmKeysDeleteRequestwithFSO line 144`).
During a rolling upgrade, an authenticated client that sends a raw
DeleteKeys request with recursive=false would make the OMs apply it
differently. For example, with a new leader and old followers:
The new leader keeps c/ and returns **DIRECTORY_NOT_EMPTY.** The old
followers don't know field 4, so they delete c/ and everything under it. The OM
state machines then diverge, and after a failover the subtree is gone.
--
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]