You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/11/11 14:35:58 UTC

[GitHub] [pulsar] codelipenghui commented on a change in pull request #12756: [Normative Issues ] Fix inaccurate naming and simplify interceptor settings.

codelipenghui commented on a change in pull request #12756:
URL: https://github.com/apache/pulsar/pull/12756#discussion_r747551168



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
##########
@@ -1289,18 +1289,9 @@ private void createPersistentTopic(final String topic, boolean createIfMissing,
                 : CompletableFuture.completedFuture(null);
 
         maxTopicsCheck.thenCompose(__ -> getManagedLedgerConfig(topicName)).thenAccept(managedLedgerConfig -> {
-            if (isBrokerEntryMetadataEnabled()) {
+            if (hasBrokerEntryMetadataInterceptor()) {
                 // init managedLedger interceptor
-                Set<BrokerEntryMetadataInterceptor> interceptors = new HashSet<>();
-                for (BrokerEntryMetadataInterceptor interceptor : brokerEntryMetadataInterceptors) {
-                    // add individual AppendOffsetMetadataInterceptor for each topic
-                    if (interceptor instanceof AppendIndexMetadataInterceptor) {
-                        interceptors.add(new AppendIndexMetadataInterceptor());

Review comment:
       We should use a new `AppendIndexMetadataInterceptor` not a shared `AppendIndexMetadataInterceptor` for each topic.




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org