poorbarcode commented on code in PR #20583:
URL: https://github.com/apache/pulsar/pull/20583#discussion_r1231938700
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java:
##########
@@ -1184,7 +1184,6 @@ protected void handleSubscribe(final CommandSubscribe
subscribe) {
ServerError error =
getErrorCodeWithErrorLog(existingConsumerFuture, true,
String.format("Consumer subscribe failure.
remoteAddress: %s, subscription: %s",
remoteAddress, subscriptionName));
- consumers.remove(consumerId, existingConsumerFuture);
Review Comment:
| time | `req-1` | `req-2` | `close connection` |
| --- | --- | --- | --- |
| 1 | | put a new `consumerFuture` |
| 2 | | | close connection |
| 3 | | | mark the `consumerFuture` as failed |
| 4 | got `consumerFuture`(failed) |
| 5 | remove the failed future |
| 6 | | add the consumer into the list and set(`list.size = 1` and `set.size
= 1`) |
| 7 | put the second `consumerFuture` | |
| 8 | add the second consumer into the list and set(`list.size = 2` and
`set.size = 1`) |
| 7 | | remove the consumer from the list and set(`list.size = 1` and
`set.size = 0`) |
Do you want to say the three requests executed as above?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]