kamalcph commented on code in PR #14381:
URL: https://github.com/apache/kafka/pull/14381#discussion_r1324171502


##########
storage/src/main/java/org/apache/kafka/storage/internals/log/RemoteIndexCache.java:
##########
@@ -79,6 +79,7 @@ public class RemoteIndexCache implements Closeable {
     private static final String TMP_FILE_SUFFIX = ".tmp";
     public static final String REMOTE_LOG_INDEX_CACHE_CLEANER_THREAD = 
"remote-log-index-cleaner";
     public static final String DIR_NAME = "remote-log-index-cache";
+    private static final long DEFAULT_REMOTE_INDEX_CACHE_SIZE_BYTES = 1024 * 
1024L;

Review Comment:
   Let's move this constant to `RemoteIndexCacheTest` since this is used only 
in the test.



##########
storage/src/main/java/org/apache/kafka/storage/internals/log/RemoteIndexCache.java:
##########
@@ -112,27 +115,55 @@ public class RemoteIndexCache implements Closeable {
      *
      * We use {@link Caffeine} cache instead of implementing a thread safe LRU 
cache on our own.
      */
-    private final Cache<Uuid, Entry> internalCache;
-    private final RemoteStorageManager remoteStorageManager;
-    private final ShutdownableThread cleanerThread;
+    private Cache<Uuid, Entry> internalCache;
 
+    // Visible for testing
     public RemoteIndexCache(RemoteStorageManager remoteStorageManager, String 
logDir) throws IOException {

Review Comment:
   We can remove this constructor and use the other constructor from the test.



-- 
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]

Reply via email to