aryangupta1998 commented on code in PR #10894:
URL: https://github.com/apache/ozone/pull/10894#discussion_r3740711926
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java:
##########
@@ -2181,19 +2194,22 @@ private List<OzoneFileStatus> buildFinalStatusList(
fileStatusFinalList.add(fileStatus);
}
return sortPipelineInfo(fileStatusFinalList, keyInfoList,
- omKeyArgs, clientAddress);
+ omKeyArgs, clientAddress, refreshPipelineInfo);
}
private List<OzoneFileStatus> sortPipelineInfo(
List<OzoneFileStatus> fileStatusFinalList, List<OmKeyInfo> keyInfoList,
- OmKeyArgs omKeyArgs, String clientAddress) throws IOException {
+ OmKeyArgs omKeyArgs, String clientAddress, boolean refreshPipelineInfo)
+ throws IOException {
if (omKeyArgs.getLatestVersionLocation()) {
slimLocationVersion(keyInfoList.toArray(new OmKeyInfo[0]));
}
- // refreshPipeline flag check has been removed as part of
- // https://issues.apache.org/jira/browse/HDDS-3658.
- // Please refer this jira for more details.
- refreshPipelineFromCache(keyInfoList);
+ if (refreshPipelineInfo) {
+ // refreshPipeline flag check has been removed as part of
Review Comment:
Updated KeyManagerImpl comment near refreshPipelineInfo to reflect current
behavior (light path intentionally skips SCM pipeline refresh), and removed
stale HDDS-3658 wording.
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataReader.java:
##########
@@ -259,8 +259,40 @@ public List<OzoneFileStatus> listStatus(OmKeyArgs args,
boolean recursive,
public List<OzoneFileStatusLight> listStatusLight(OmKeyArgs args,
boolean recursive, String startKey, long numEntries,
boolean allowPartialPrefixes) throws IOException {
- List<OzoneFileStatus> ozoneFileStatuses =
- listStatus(args, recursive, startKey, numEntries,
allowPartialPrefixes);
+ long maxListingPageSize = ozoneManager.getConfiguration().getInt(
+ OZONE_FS_LISTING_PAGE_SIZE_MAX,
+ OZONE_FS_LISTING_PAGE_SIZE_DEFAULT);
+ maxListingPageSize = OzoneConfigUtil.limitValue(numEntries,
+ OZONE_FS_LISTING_PAGE_SIZE, OZONE_FS_LISTING_PAGE_SIZE_MAX,
+ maxListingPageSize);
+
+ ResolvedBucket bucket = ozoneManager.resolveBucketLink(args);
+ boolean auditSuccess = true;
+ Map<String, String> auditMap = bucket.audit(args.toAuditMap());
+ OmKeyArgs resolvedArgs = bucket.update(args);
+
+ List<OzoneFileStatus> ozoneFileStatuses;
+ try {
+ if (isAclEnabled) {
+ checkAcls(getResourceType(resolvedArgs), StoreType.OZONE, ACLType.READ,
+ bucket, resolvedArgs.getKeyName());
+ }
+ metrics.incNumListStatus();
Review Comment:
Refactored OmMetadataReader.listStatusLight() so metrics.incNumListStatus()
remains in try, and success audit is logged only after successful list + light
conversion.
--
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]