Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
When a key is deleted from OM, only the latest version of blocks are sent to SCM for deletion.
In OmMetadataManagerImpl#getPendingDeletionKeys(), we gey the latest version location information and return only those blocks for deletion to KeyDeletingService. This leads to older versions of blocks being orphaned.
RepeatedOmKeyInfo infoList = kv.getValue(); // Get block keys as a list. for (OmKeyInfo info : infoList.getOmKeyInfoList()) { OmKeyLocationInfoGroup latest = info.getLatestVersionLocations(); List<BlockID> item = latest.getLocationList().stream() .map(b -> new BlockID(b.getContainerID(), b.getLocalID())) .collect(Collectors.toList()); BlockGroup keyBlocks = BlockGroup.newBuilder() .setKeyName(kv.getKey()) .addAllBlockIDs(item) .build(); keyBlocksList.add(keyBlocks); currentCount++; }
Attachments
Issue Links
- is related to
-
HDDS-6316 Potential orphan blocks when keys are overwritten
- Resolved
- links to