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/06/25 14:18:22 UTC

[GitHub] [pulsar] codelipenghui opened a new pull request #11097: Fix race condition of the SystemTopicBasedTopicPoliciesService

codelipenghui opened a new pull request #11097:
URL: https://github.com/apache/pulsar/pull/11097


   ### Motivation
   
   Currently, we are triggering the reader to read more messages not waiting for the init policies cache to complete,
   This might lead to the init process got hasMessages=true but not able to read the message since the message has been
   consumed by the read more entries process will lead to the `topic policy cache not init` exception.
   
   Here are the details of the race condition:
   
   https://github.com/apache/pulsar/blob/0b67438d23bbbc46b500e896a18aad715a514fd9/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/SystemTopicBasedTopicPoliciesService.java#L190
   
   https://github.com/apache/pulsar/blob/0b67438d23bbbc46b500e896a18aad715a514fd9/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/SystemTopicBasedTopicPoliciesService.java#L248
   
   https://github.com/apache/pulsar/blob/0b67438d23bbbc46b500e896a18aad715a514fd9/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/SystemTopicBasedTopicPoliciesService.java#L275
   
   


-- 
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] hangc0276 edited a comment on pull request #11097: Fix race condition of the SystemTopicBasedTopicPoliciesService

Posted by GitBox <gi...@apache.org>.
hangc0276 edited a comment on pull request #11097:
URL: https://github.com/apache/pulsar/pull/11097#issuecomment-869005818


   please take a look the test failed.
   ```
   org.awaitility.core.ConditionTimeoutException: Assertion condition defined as a lambda expression in org.apache.pulsar.broker.admin.TopicPoliciesTest expected 
   [InactiveTopicPolicies(inactiveTopicDeleteMode=delete_when_no_subscriptions, maxInactiveDurationSeconds=200, deleteWhileInactive=false)] 
   but found [InactiveTopicPolicies(inactiveTopicDeleteMode=delete_when_subscriptions_caught_up, maxInactiveDurationSeconds=100, deleteWhileInactive=true)] within 10 seconds.
   ```


-- 
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 #11097: Fix race condition of the SystemTopicBasedTopicPoliciesService

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


   


-- 
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] hangc0276 commented on pull request #11097: Fix race condition of the SystemTopicBasedTopicPoliciesService

Posted by GitBox <gi...@apache.org>.
hangc0276 commented on pull request #11097:
URL: https://github.com/apache/pulsar/pull/11097#issuecomment-869005818


   please take a look the test failed.
   ```
   ```


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