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/08/01 10:06:23 UTC

[GitHub] [pulsar] Jason918 opened a new pull request, #16899: [Branch 2.7] Avoid potentially blocking calls to metadata in PersistentTopic#getMessageTTL

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

   ### Motivation
   
   This PR is part of work of cherry-pick #12340 to branch 2.7
   
   There is a concurrent issue when updating namespace TTL, causing `AdminApiTest#testTopicStatsLastExpireTimestampForSubscription` fails periodically.
   
   The root cause is that in `NamespacesBase#internalSetNamespaceMessageTTL`:
   - Step A, we write new namespace policy data to zk
   - Step B, we call `policiesCache().invalidate` to disable the cache.
   
   But between Step A and B, `ZooKeeperDataCache` will receive a data change event, and new data of `policiesCache` will be reloaded in `ZooKeeperDataCache#reloadCache`. So this reloaded data will invalidated in Step B. 
   
   And in `PersistentTopic#onPoliciesUpdate` (triggered by Step A) won't be able to get policy data with `policiesCache().getDataIfPresent`, so `checkMessageExpiry` is skipped and results in `AdminApiTest#testTopicStatsLastExpireTimestampForSubscription` failure. 
   
   
   ### Modifications
   
   Remove `policiesCache().invalidate` in Step B.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   ### Documentation
   
   Check the box below or label this PR directly.
   
   - [x] `doc-not-needed` 
   
   Bug fix
   


-- 
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 pull request #16899: [Branch 2.7] Avoid potentially blocking calls to metadata in PersistentTopic#getMessageTTL

Posted by GitBox <gi...@apache.org>.
Jason918 commented on PR #16899:
URL: https://github.com/apache/pulsar/pull/16899#issuecomment-1201108325

   /pulsarbot run-failure-checks


-- 
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] codelipenghui merged pull request #16899: [Branch 2.7] Avoid potentially blocking calls to metadata in PersistentTopic#getMessageTTL

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


-- 
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 pull request #16899: [Branch 2.7] Avoid potentially blocking calls to metadata in PersistentTopic#getMessageTTL

Posted by GitBox <gi...@apache.org>.
Jason918 commented on PR #16899:
URL: https://github.com/apache/pulsar/pull/16899#issuecomment-1201931244

   @codelipenghui @merlimat @mattisonchao @Technoboy- PTAL


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