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/08/26 03:22:30 UTC

[GitHub] [pulsar] 315157973 opened a new pull request #11788: Fix ConcurrentModificationException occurs when failPendingMessages

315157973 opened a new pull request #11788:
URL: https://github.com/apache/pulsar/pull/11788


   Fixes #11783
   
   ### Motivation
   Looks like this issue was introduced by #9650
   
   ### Modifications
   pendingMessages is a very frequently used queue. In order to avoid GC, I used `ArrayBlockingQueue` instead of `LinkedBlockingDeque`
   But when the capacity of `ArrayBlockingQueue` is set to 0, an exception will be thrown. Therefore, when the initial capacity is 0, `LinkedBlockingDeque` is used
   
   
   ### Documentation
   
   no need doc


-- 
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] merlimat commented on pull request #11788: Fix ConcurrentModificationException occurs when failPendingMessages

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


   > I am not sure this is the correct fix.
   > 
   > On one hand this change will fix the ConcurrentModificationException
   > But after reading #9650 it looks like the `pendingMessagesQueue` should be always accessed in a thread safe way.
   > Did you consider working on the loop in `failPendingMessages` and ensure thread safe access to `pendingMessagesQueue` ?
   
   I agree with @eolivelli, we should fix the concurrent access since most (obviously not all...) accesses to that queue are already protected by the ProducerImpl mutex.


-- 
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] eolivelli commented on pull request #11788: Fix ConcurrentModificationException occurs when failPendingMessages

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


   @merlimat ?


-- 
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] 315157973 closed pull request #11788: Fix ConcurrentModificationException occurs when failPendingMessages

Posted by GitBox <gi...@apache.org>.
315157973 closed pull request #11788:
URL: https://github.com/apache/pulsar/pull/11788


   


-- 
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] 315157973 commented on pull request #11788: Fix ConcurrentModificationException occurs when failPendingMessages

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


   OK, I will find it out


-- 
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] 315157973 closed pull request #11788: Fix ConcurrentModificationException occurs when failPendingMessages

Posted by GitBox <gi...@apache.org>.
315157973 closed pull request #11788:
URL: https://github.com/apache/pulsar/pull/11788


   


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