wolfstudy edited a comment on pull request #366:
URL: https://github.com/apache/pulsar-client-go/pull/366#issuecomment-696497144
All requests in the go client will enter the incomingRequestChannel, and
then the request will be processed in the runEventsLoop. incomingRequestChannel
is a channel with a buffer. When the size of the buffer is reached, it will
wait for the consumer in the channel (different from the consumer of pulsar) to
consume data. In the current processing of the go client, there is no
incomingRequestChannel close logic. We previously thought that after closing
the consumer and closing the connection, all the corresponding states need to
be cleaned up. But in fact, there was no suitable time to close the channel
that received the request.
First: After closing the connection, it will immediately enter the logic of
reconnection. At this time, you still need to use incomingRequestChannel to
receive data.
Second: In runEventsLoop, as long as a data request enters the
eventsChannel, the entire processing flow will not be blocked
In my repeated attempts to reproduce locally, I only encountered the
following errors:
```
consumer_partition_integration_test.go:97: Got message 55800
consumer_partition_integration_test.go:96:
Error Trace: consumer_partition_integration_test.go:96
asm_amd64.s:1373
Error: Received unexpected error:
context deadline exceeded
Test: TestDeadlock
11:09:36.912 [pulsar-web-69-11] INFO org.eclipse.jetty.server.RequestLog -
127.0.0.1 - - [21/Sep/2020:11:09:36 +0000] "GET
/admin/v2/persistent/public/functions/coordinate/stats?getPreciseBacklog=false
HTTP/1.
```
This error has nothing to do with the problem itself. It is caused by the
context timeout. We try to increase the context timeout to avoid this problem.
----------------------------------------------------------------
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:
[email protected]