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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to