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 2018/06/12 18:10:09 UTC

[GitHub] ivankelly opened a new pull request #1952: Fix race in MultiTopicsConsumerImpl#redeliverUnacknowledgedMessages

ivankelly opened a new pull request #1952: Fix race in MultiTopicsConsumerImpl#redeliverUnacknowledgedMessages
URL: https://github.com/apache/incubator-pulsar/pull/1952
 
 
   This method calls #redeliverUnacknowledgedMessages on all underlying
   consumers and clears the incomingMessages queue. There was a race that
   the redelivery could happen before the incomingMessages was cleared,
   and therefore redelivered messages could be lost. Previously this
   block was protected by synchronized(this) block, but this didn't
   protect against any other blocks.
   
   This patch changes the synchronization to use the writeLock of the
   same lock which is acquired before messages are pushed onto the queue.
   
   This race was the source of flake in
   ResendRequestTest.testSharedSingleAckedPartitionedTopic
   
   Issue: #1160
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services