smengcl commented on code in PR #11477:
URL: https://github.com/apache/ozone/pull/11477#discussion_r4243750301
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneManagerVersion.java:
##########
@@ -72,6 +72,11 @@ public enum OzoneManagerVersion implements ComponentVersion {
"OzoneManager version that rejects lookupFile on OBJECT_STORE buckets "
+ "server-side, so file system clients no longer need the "
+ "client-side InfoBucket layout check for getFileChecksum"),
+ LIST_STATUS_REJECTS_OBS(16,
Review Comment:
An OM without this change can report `ZDU (100)` after upgrade finalization.
This version passes the new client version check. The client then does not send
InfoBucket.
However, that OM ignores `requireFileSystemLayout`. It can therefore list an
OBJECT_STORE bucket when it must reject the request.
Please add `LIST_STATUS_REJECTS_OBS` after `ZDU`, and use version `101`.
In `TestOMVersionManager` and `TestOMUpgradeFinalization`, keep the pre-ZDU
expected version at `LOOKUP_FILE_REJECTS_OBS`.
Please add an adapter test. The test must show that the client sends
InfoBucket when the OM reports `ZDU`.
```diff
---
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneManagerVersion.java
+++
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneManagerVersion.java
@@ -73,10 +73,10 @@
+ "server-side, so file system clients no longer need the "
+ "client-side InfoBucket layout check for getFileChecksum"),
- LIST_STATUS_REJECTS_OBS(16,
+ ZDU(100, "OzoneManager version that supports zero downtime upgrade"),
+ LIST_STATUS_REJECTS_OBS(101,
"OzoneManager version that rejects listStatus on OBJECT_STORE buckets
"
+ "server-side when the request sets requireFileSystemLayout, so
file "
+ "system clients no longer need the client-side InfoBucket
layout "
+ "check for listStatus"),
- ZDU(100, "OzoneManager version that supports zero downtime upgrade"),
UNKNOWN_VERSION(-1, "Used when a version cannot be deserialized to any
version recognized by this" +
```
--
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]