F64116045 commented on code in PR #11739:
URL: https://github.com/apache/ozone/pull/11739#discussion_r4367693802
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java:
##########
@@ -1051,7 +1051,9 @@ public ListOpenFilesResult listOpenFiles(BucketLayout
bucketLayout,
kv = openKeyIter.next();
if (kv != null && kv.getKey().startsWith(dbOpenKeyPrefix)) {
String dbKey = kv.getKey();
- long clientID = OMMetadataManager.getClientIDFromOpenKeyDBKey(dbKey);
+ // The open key of a multipart upload ends with the upload ID and
has no client ID
+ final boolean isUpload =
OMMultipartUploadUtils.getUploadIdFromDbKey(dbKey) != null;
+ long clientID = isUpload ? 0 :
OMMetadataManager.getClientIDFromOpenKeyDBKey(dbKey);
Review Comment:
nit: I think you use 0 to mean "no client ID" for an upload
Since there's already a comment right above, maybe we could just extend it
to make this explicit?
--
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]