ArafatKhan2198 commented on code in PR #5445:
URL: https://github.com/apache/ozone/pull/5445#discussion_r1395937127
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/S3InMemoryCache.java:
##########
@@ -49,10 +51,38 @@ public void invalidate(String id) {
}
/**
- * Clears the cache, removing all entries.
+ * Clears the cache by removing entries that correspond to transactions
+ * flushed by the doubleBuffer.
+ *
+ * @param flushedTransactionIds A list of transaction IDs that have been
+ * flushed and should be used to identify and
+ * remove corresponding cache entries.
*/
- public void clearCache() {
- cache.invalidateAll();
+ @Override
+ public void clearCache(List<Long> flushedTransactionIds) {
+ // Create a map to store transactionLogIndex-to-cacheKey mappings
+ Map<Long, Set<String>> transactionIdToCacheKeys = new HashMap<>();
Review Comment:
Yes you are right every Ratis transaction will have a different index. I'll
change that!
Thanks @sadanand48
--
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]