heesung-sn commented on code in PR #19045:
URL: https://github.com/apache/pulsar/pull/19045#discussion_r1090438614
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -202,6 +205,11 @@ public class PersistentTopic extends AbstractTopic
implements Topic, AddEntryCal
private CompletableFuture<Long> currentCompaction =
CompletableFuture.completedFuture(COMPACTION_NEVER_RUN);
private final CompactedTopic compactedTopic;
+ // TODO: Create compaction strategy from topic policy when exposing
strategic compaction to users.
+ private static Map<String, TopicCompactionStrategy> strategicCompactionMap
= Map.of(
+ ServiceUnitStateChannelImpl.TOPIC,
+ new ServiceUnitStateCompactionStrategy());
Review Comment:
I am trying to avoid introducing a new member var in PersistentTopic as its
memory unnecessarily multiplies as many as topics.
We can remove this hashmap and move each topic compaction strategy config to
topic policy once Pulsar exposes this strategic compaction to users.
--
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]