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/11 15:05:59 UTC

[GitHub] [pulsar] lhotari commented on pull request #14231: Fix race condition of OpSendMsgQueue when publishing messages

lhotari commented on pull request #14231:
URL: https://github.com/apache/pulsar/pull/14231#issuecomment-1036309041


   > looks like we don't have to synchronize here because we can accept the incorrect pending messages at a moment?
   
   That is risky. It's undefined what the behavior of ArrayDeque would be if it's accessed without proper synchronization. Usually it would be "just" a data consistency issue. In the case of java.util.HashMap, concurrent modifications and access c[ould lead to an infinite loop before Java 8](https://stackoverflow.com/a/44180452).


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