diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactedTopicImpl.java b/pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactedTopicImpl.java index dfafbc41cb45c..f67f28733bddb 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactedTopicImpl.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactedTopicImpl.java @@ -62,7 +62,7 @@ public class CompactedTopicImpl implements CompactedTopic { static final long NEWER_THAN_COMPACTED = -0xfeed0fbaL; static final long COMPACT_LEDGER_EMPTY = -0xfeed0fbbL; - static final int DEFAULT_STARTPOINT_CACHE_SIZE = 100; + static final int DEFAULT_MAX_CACHE_SIZE = 100; private final BookKeeper bk; @@ -254,7 +254,7 @@ private static CompletableFuture openCompactedLedger(Book } }, null); return promise.thenApply((ledger) -> new CompactedTopicContext( - ledger, createCache(ledger, DEFAULT_STARTPOINT_CACHE_SIZE))); + ledger, createCache(ledger, DEFAULT_MAX_CACHE_SIZE))); } private static CompletableFuture tryDeleteCompactedLedger(BookKeeper bk, long id) {