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/10/28 16:21:17 UTC

[GitHub] [pulsar-client-go] Gleiphir2769 opened a new pull request, #875: [Fix] Fix the stuck caused by availablePermitsCh

Gleiphir2769 opened a new pull request, #875:
URL: https://github.com/apache/pulsar-client-go/pull/875

   ### Motivation
   
   The `availablePermitsCh` may cause the dispatcher stuck.
   
   https://github.com/apache/pulsar-client-go/blob/0b0720ab73d7f6378b8b6ac37acbafe547c268c8/pulsar/consumer_partition.go#L1096-L1109
   
   For example, if `messageCh <- nextMessage` continueously selected 10 times, the `availablePermitsCh` will be filled. The next `messageCh <- nextMessage` will be stuck forever because `pr := <-pc.availablePermitsCh` can never be reached.
   
   ### Modifications
   
   Move `<-pc.availablePermitsCh` before all the `pc.availablePermitsCh<-`.
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:


-- 
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-client-go] RobertIndie merged pull request #875: [Fix] Fix the dispatcher() stuck caused by availablePermitsCh

Posted by GitBox <gi...@apache.org>.
RobertIndie merged PR #875:
URL: https://github.com/apache/pulsar-client-go/pull/875


-- 
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-client-go] Gleiphir2769 commented on pull request #875: [Fix] Fix the stuck caused by availablePermitsCh

Posted by GitBox <gi...@apache.org>.
Gleiphir2769 commented on PR #875:
URL: https://github.com/apache/pulsar-client-go/pull/875#issuecomment-1296695239

   @RobertIndie @nodece Could you give a review?


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