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/06/25 07:39:14 UTC
[GitHub] [pulsar] mattisonchao commented on pull request #11089: fix flaky test testDuplicateConcurrentSubscribeCommand
mattisonchao commented on pull request #11089:
URL: https://github.com/apache/pulsar/pull/11089#issuecomment-868292138
If the first subscription status returns faster than the second subscription, the second subscription will always return `sendSuccessResponse`, because the first subscription is completed and will not cause an exception, then they will enter this if branch:
```java
ServerCnx.java 953:961
if (existingConsumerFuture != null) {
if (existingConsumerFuture.isDone() && !existingConsumerFuture.isCompletedExceptionally()) {
Consumer consumer = existingConsumerFuture.getNow(null);
log.info("[{}] Consumer with the same id is already created:"
+ " consumerId={}, consumer={}",
remoteAddress, consumerId, consumer);
commandSender.sendSuccessResponse(requestId);
return null;
} else { //... some code}
```
Do I understand it right? : )
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org