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/06/29 15:09:29 UTC

[GitHub] [pulsar] poorbarcode commented on pull request #16247: [fix] [broker] The broker has two identical Persitenttopics

poorbarcode commented on PR #16247:
URL: https://github.com/apache/pulsar/pull/16247#issuecomment-1170101266

   Hi @codelipenghui 
   
   > We also should consider to avoid a topic can be closed more than once.
   
   I have appended the reason why `topic.close` was executed twice to the Motivation, and in this PR I've overwritten the `topic.close` to fix it. I also added a lock to the 'reset topic stat to UN-fenced' operation, could you review the code.
   
    > We can use map.compute() to simplify the logic? 
   
   Unfortunately, we can't use `map.compute` tto simplify the logic.
   
   > And looks like we don't need to wait for the future complete, because we already have the topic reference here.
    Yes, I have fixed it. The current implementation doesn't need to wait for the future to complete.
   
   I also rewritten the Motivation of this PR to make it easier to understand. 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