shekhars-li commented on code in PR #1687:
URL: https://github.com/apache/samza/pull/1687#discussion_r1336420707
##########
samza-core/src/main/java/org/apache/samza/storage/blobstore/util/BlobStoreUtil.java:
##########
@@ -670,12 +676,18 @@ private CompletableFuture<Void> removeTTL(DirIndex
dirIndex, Metadata metadata)
metadata.getJobName(), metadata.getJobId(),
metadata.getTaskName(), metadata.getStoreName());
List<FileBlob> fileBlobs = file.getBlobs();
for (FileBlob fileBlob : fileBlobs) {
- String opname = "removeTTL for fileBlob: " + file.getFileName() + "
with blobId: {}" + fileBlob.getBlobId();
- Supplier<CompletionStage<Void>> ttlRemovalAction = () ->
- blobStoreManager.removeTTL(fileBlob.getBlobId(),
requestMetadata).toCompletableFuture();
- CompletableFuture<Void> ttlRemovalFuture =
- FutureUtil.executeAsyncWithRetries(opname, ttlRemovalAction,
isCauseNonRetriable(), executor, retryPolicyConfig);
- updateTTLsFuture.add(ttlRemovalFuture);
+ if (ttlRemovedBlobIdsCache.getIfPresent(fileBlob.getBlobId()) == null)
{
+ String opname = "removeTTL for fileBlob: " + file.getFileName() + "
with blobId: {}" + fileBlob.getBlobId();
+ Supplier<CompletionStage<Void>> ttlRemovalAction = () ->
+ blobStoreManager.removeTTL(fileBlob.getBlobId(),
requestMetadata).toCompletableFuture()
+ .thenRun(() ->
ttlRemovedBlobIdsCache.put(fileBlob.getBlobId(), new Object()));
Review Comment:
Thanks. Added timestamp that to the cache and to debug lines.
--
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]