smengcl commented on code in PR #9089:
URL: https://github.com/apache/ozone/pull/9089#discussion_r2409028918
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMOpenKeysDeleteRequest.java:
##########
@@ -139,18 +142,18 @@ private void processResults(OMMetrics omMetrics, long
numSubmittedOpenKeys,
private void updateOpenKeyTableCache(OzoneManager ozoneManager,
long trxnLogIndex, OpenKeyBucket keysPerBucket,
- Map<String, OmKeyInfo> deletedOpenKeys) throws IOException {
+ Map<String, Pair<Long, OmKeyInfo>> deletedOpenKeys) throws IOException {
boolean acquiredLock = false;
String volumeName = keysPerBucket.getVolumeName();
String bucketName = keysPerBucket.getBucketName();
OMMetadataManager omMetadataManager = ozoneManager.getMetadataManager();
-
try {
mergeOmLockDetails(omMetadataManager.getLock()
.acquireWriteLock(BUCKET_LOCK, volumeName, bucketName));
acquiredLock = getOmLockDetails().isLockAcquired();
-
+ OmBucketInfo omBucketInfo = getBucketInfo(omMetadataManager, volumeName,
bucketName);
+ long bucketId = omBucketInfo == null ? 0L : omBucketInfo.getObjectID();
Review Comment:
`omBucketInfo == null` means the bucket is deleted already?
--
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]