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 2020/03/29 08:37:46 UTC

[GitHub] [pulsar] fracasula commented on issue #6627: Ghost consumer

fracasula commented on issue #6627: Ghost consumer
URL: https://github.com/apache/pulsar/issues/6627#issuecomment-605603958
 
 
   > Hi @fracasula. According to your description, did you subscribe only once, right? I noticed you logs
   > 
   > ```
   > [/10.1.1.76:33118] Cleared consumer created after timeout on client side Consumer{subscription=PersistentSubscription{topic=persistent://public/default/UserJoinedSpace, name=cloud-spaceroom-service}, consumerId=18, consumerName=a0869e4030, address=/10.1.1.76:33118}
   > ```
   > 
   > Looks the issue is related to the consumer creation timeout. Can you find any log about `Closed connection from`?
   > 
   > @wolfstudy Hi xiaolong. I want to invite you to join the discussion. Maybe the problem is we don't close the consumer at the broker-side after creating consumer timeout at the client-side.
   
   Hi @codelipenghui, yes that's correct. Our code has been audited by 3 different engineers and we confirm that we're subscribing only once.
   
   By looking at our [client logs](https://github.com/apache/pulsar/files/4398450/client_logs.txt) it looks like the client was having issues connecting to the broker so it rescheduled a few reconnections. By looking at the broker side instead we in fact see that the broker received multiple requests for creating that consumer and, although it did detect that a consumer with ID 18 was already present on the connection, my guess is that it didn't close one of the two after all.
   
   These are the logs you requested reporting all "Connection closed from" on the broker side: [closed_connections_logs.txt](https://github.com/apache/pulsar/files/4398459/closed_connections_logs.txt).
   
   We should expect one from `10.1.1.76:33118`, right?
   
   Another question, I hope you don't mind. I was looking at this [bit of code](https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java#L795) which clearly gets called in this case. I'm not very familiar with Java and futures so pardon me if the question doesn't make sense but in that comment you explain that you need to wait until the previous consumer creation request either completes or fails. What happens if that future hangs forever? Is that even possible or is there a timeout that would prevent that from happening so that eventually `isDone` returns?
   

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


With regards,
Apache Git Services