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 2022/07/12 02:03:50 UTC

[GitHub] [pulsar] congbobo184 opened a new pull request, #16533: [fix][txn] fix pattern sub filter transaction system topic

congbobo184 opened a new pull request, #16533:
URL: https://github.com/apache/pulsar/pull/16533

   ### Motivation
   now if sub with txn will create pendingAck `managedLedger`, if one consumer use pattern sub by this namespace, will get the pendingAck `managedLedger` and try to sub the pendingAck `managedLedger`. then broker will try to create the pending ack topic, but now the pendingAck topic is forbidden to be created. So the consumer will not sub success.
   
   don't allow the user to get the pendingAck `managedLedger`, and sub the pendingAck `managedLedger`.
   ### Modifications
   filter the topic when users use patterns to get the topic's list.
   ### Verifying this change
   add the test
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API: (no)
     - The schema: (no)
     - The default values of configurations: (no)
     - The wire protocol: (no)
     - The rest endpoints: (no)
     - The admin cli options: (no)
     - Anything that affects deployment: (no)
   
   ### Documentation
   
     - Does this pull request introduces a new feature? (yes)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a follow-up issue for adding the documentation
   


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


[GitHub] [pulsar] congbobo184 merged pull request #16533: [fix][txn] fix pattern sub filter transaction system topic

Posted by GitBox <gi...@apache.org>.
congbobo184 merged PR #16533:
URL: https://github.com/apache/pulsar/pull/16533


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


[GitHub] [pulsar] shibd commented on a diff in pull request #16533: [fix][txn] fix pattern sub filter transaction system topic

Posted by "shibd (via GitHub)" <gi...@apache.org>.
shibd commented on code in PR #16533:
URL: https://github.com/apache/pulsar/pull/16533#discussion_r1120225388


##########
pulsar-common/src/main/java/org/apache/pulsar/common/topics/TopicList.java:
##########
@@ -56,6 +57,12 @@ public static List<String> filterTopics(List<String> original, Pattern topicsPat
                 .collect(Collectors.toList());
     }
 
+    public static List<String> filterTransactionInternalName(List<String> original) {
+        return original.stream()
+                .filter(topic -> !SystemTopicNames.isTransactionInternalName(TopicName.get(topic)))

Review Comment:
   Why just filter transaction internal name? Something like(`__transaction_buffer_snapshot`, `__transaction_buffer_snapshot_segments`, `__transaction_buffer_snapshot_indexes`) these doesn't seem to be filtered out



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