Skip to content
Merged
Changes from all 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 @@ -116,7 +116,10 @@ protected int processKeyDeletes(List<BlockGroup> keyBlocksList,
}
List<DeleteBlockGroupResult> blockDeletionResults =
scmClient.deleteKeyBlocks(keyBlocksList);
LOG.info("{} BlockGroup deletion are acked by SCM in {} ms",
keyBlocksList.size(), Time.monotonicNow() - startTime);
if (blockDeletionResults != null) {
startTime = Time.monotonicNow();
if (isRatisEnabled()) {
delCount = submitPurgeKeysRequest(blockDeletionResults,
keysToModify, snapTableKey);
Expand All @@ -126,11 +129,8 @@ protected int processKeyDeletes(List<BlockGroup> keyBlocksList,
// OMRequest model.
delCount = deleteAllKeys(blockDeletionResults, manager);
}
if (LOG.isDebugEnabled()) {
LOG.debug("Blocks for {} (out of {}) keys are deleted in {} ms",
delCount, blockDeletionResults.size(),
Time.monotonicNow() - startTime);
}
LOG.info("Blocks for {} (out of {}) keys are deleted from DB in {} ms",
delCount, blockDeletionResults.size(), Time.monotonicNow() - startTime);
}
return delCount;
}
Expand Down Expand Up @@ -277,12 +277,14 @@ protected RaftClientRequest createRaftClientRequestForPurge(
* Parse Volume and Bucket Name from ObjectKey and add it to given map of
* keys to be purged per bucket.
*/
private void addToMap(Map<Pair<String, String>, List<String>> map,
String objectKey) {
private void addToMap(Map<Pair<String, String>, List<String>> map, String objectKey) {
// Parse volume and bucket name
String[] split = objectKey.split(OM_KEY_PREFIX);
Preconditions.assertTrue(split.length > 3, "Volume and/or Bucket Name " +
"missing from Key Name.");
Preconditions.assertTrue(split.length >= 3, "Volume and/or Bucket Name " +
"missing from Key Name " + objectKey);
if (split.length == 3) {
LOG.warn("{} missing Key Name", objectKey);
}
Pair<String, String> volumeBucketPair = Pair.of(split[1], split[2]);
if (!map.containsKey(volumeBucketPair)) {
map.put(volumeBucketPair, new ArrayList<>());
Expand Down