Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.apache.hadoop.hdds.utils.db.BatchOperation;

import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;

import static org.apache.hadoop.ozone.om.OmMetadataManagerImpl.BUCKET_TABLE;
import static org.apache.hadoop.ozone.om.OmMetadataManagerImpl.DELETED_TABLE;
Expand Down Expand Up @@ -130,6 +131,7 @@ protected OmKeyInfo getOmKeyInfo() {
return omKeyInfo;
}

@Nullable
protected OmBucketInfo getOmBucketInfo() {
return omBucketInfo;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,14 @@ public void addToDBBatch(OMMetadataManager omMetadataManager,
}

// namespace quota changes for parent directory
String bucketKey = omMetadataManager.getBucketKey(
getOmBucketInfo().getVolumeName(),
getOmBucketInfo().getBucketName());
omMetadataManager.getBucketTable().putWithBatch(batchOperation,
bucketKey, getOmBucketInfo());
OmBucketInfo omBucketInfo = getOmBucketInfo();
if (omBucketInfo != null) {
String bucketKey = omMetadataManager.getBucketKey(
omBucketInfo.getVolumeName(),
omBucketInfo.getBucketName());
omMetadataManager.getBucketTable().putWithBatch(batchOperation,
bucketKey, omBucketInfo);
}

if (OMFileRequest.getOmKeyInfoFromFileTable(true,
omMetadataManager, getMultiPartKey(), getOmKeyInfo().getKeyName())
Expand Down