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/02/10 10:42:03 UTC

[GitHub] [pulsar] leizhiyuan opened a new pull request #14217: allow user override subproperties for update properties

leizhiyuan opened a new pull request #14217:
URL: https://github.com/apache/pulsar/pull/14217


   now entry filter uses the first consumer properties to PersistentSubscription , but when users modified their code, and change the properties, it will not take effect.
   
   ### Motivation
   
   users use entry filter to implement tag filter, 
   
   time 1 : they use tag1 
   time 2 : users upgrade their code, and use tag2,
   
   We will not take effect, only restart all brokers or users restart their apps. it is impossible.
   
   *Explain here the context, and why you're making that change. What is the problem you're trying to solve.*
   
   ### Modifications
   
   
   override the properties every time. then when users upgrade their app, this will take effect.
   
   ### Verifying this change
   
   add test case
   
   ### 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): (yes / no)
     - The public API: (yes / no)
     - The schema: (yes / no / don't know)
     - The default values of configurations: (yes / no)
     - The wire protocol: (yes / no)
     - The rest endpoints: (yes / no)
     - The admin cli options: (yes / no)
     - Anything that affects deployment: (yes / no / don't know)
   
   ### Documentation
   
   Check the box below or label this PR directly (if you have committer privilege).
   
   Need to update docs? 
   
   - [ ] `doc-required` 
     
     (If you need help on updating docs, create a doc issue)
     
   - [ ] `no-need-doc` 
     
     (Please explain why)
     
   - [ ] `doc` 
     
     (If this PR contains doc changes)
   
   
   


-- 
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] github-actions[bot] commented on pull request #14217: allow user override subproperties for update properties

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #14217:
URL: https://github.com/apache/pulsar/pull/14217#issuecomment-1034816410


   @leizhiyuan:Thanks for your contribution. For this PR, do we need to update docs?
   (The [PR template contains info about doc](https://github.com/apache/pulsar/blob/master/.github/PULL_REQUEST_TEMPLATE.md#documentation), which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)


-- 
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] github-actions[bot] commented on pull request #14217: allow user override subproperties for update properties

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #14217:
URL: https://github.com/apache/pulsar/pull/14217#issuecomment-1079814967


   The pr had no activity for 30 days, mark with Stale label.


-- 
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] Jason918 commented on a change in pull request #14217: allow user override subproperties for update properties

Posted by GitBox <gi...@apache.org>.
Jason918 commented on a change in pull request #14217:
URL: https://github.com/apache/pulsar/pull/14217#discussion_r804316087



##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/CreateSubscriptionTest.java
##########
@@ -275,10 +276,7 @@ public void addSubscriptionPropertiesTest() throws Exception {
         subscription4 = (PersistentSubscription) pulsar.getBrokerService()
                 .getTopicReference(topic).get().getSubscription(subName);
         properties4 = subscription4.getSubscriptionProperties();
-        assertTrue(properties4.containsKey("3"));
-        assertTrue(properties4.containsKey("4"));
-        assertEquals(properties4.get("3"), "3");
-        assertEquals(properties4.get("4"), "4");
+        assertTrue(properties4.isEmpty());

Review comment:
       `//consumer subscribe without subscriptionProperties set, it will get the old one`
   This PR changed this feature. It's worth discussing.




-- 
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] leizhiyuan commented on a change in pull request #14217: allow user override subproperties for update properties

Posted by GitBox <gi...@apache.org>.
leizhiyuan commented on a change in pull request #14217:
URL: https://github.com/apache/pulsar/pull/14217#discussion_r804364160



##########
File path: pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/CreateSubscriptionTest.java
##########
@@ -275,10 +276,7 @@ public void addSubscriptionPropertiesTest() throws Exception {
         subscription4 = (PersistentSubscription) pulsar.getBrokerService()
                 .getTopicReference(topic).get().getSubscription(subName);
         properties4 = subscription4.getSubscriptionProperties();
-        assertTrue(properties4.containsKey("3"));
-        assertTrue(properties4.containsKey("4"));
-        assertEquals(properties4.get("3"), "3");
-        assertEquals(properties4.get("4"), "4");
+        assertTrue(properties4.isEmpty());

Review comment:
       ok,I will change it




-- 
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] github-actions[bot] commented on pull request #14217: allow user override subproperties for update properties

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #14217:
URL: https://github.com/apache/pulsar/pull/14217#issuecomment-1034818858


   @leizhiyuan:Thanks for providing doc info!


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