coderzc commented on code in PR #20718:
URL: https://github.com/apache/pulsar/pull/20718#discussion_r1260537321
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -481,8 +492,10 @@ public CompletableFuture<Void> unloadSubscription(@Nonnull
String subName) {
private PersistentSubscription createPersistentSubscription(String
subscriptionName, ManagedCursor cursor,
boolean replicated, Map<String, String> subscriptionProperties) {
- Objects.requireNonNull(compactedTopic);
- if (isCompactionSubscription(subscriptionName)) {
+ Objects.requireNonNull(topicCompactionService);
+ if (isCompactionSubscription(subscriptionName)
+ && topicCompactionService instanceof
PulsarTopicCompactionService pulsarTopicCompactionService) {
+ CompactedTopicImpl compactedTopic =
pulsarTopicCompactionService.getCompactedTopic();
Review Comment:
Other TopicCompactionService also creates the `__compaction` subscription,
see: line-496.
In addition, `PulsarCompactorSubscription` only overrides the
`aknowledgeMessage` method to early delete historical data, but it is not
required the other `TopicCompactionService` can handle it through other way.
--
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]