-
Notifications
You must be signed in to change notification settings - Fork 370
Open
Description
Expected behavior
No panic.
Actual behavior
panic: runtime error: index out of range [0] with length 0
goroutine 10127 [running]:
github.com/apache/pulsar-client-go/pulsar.(*partitionConsumer).dispatcher(0xc008556000)
D:/myGo/pkg/mod/github.com/apache/pulsar-client-go@v0.17.0/pulsar/consumer_partition.go:1721 +0xf94
created by github.com/apache/pulsar-client-go/pulsar.newPartitionConsumer in goroutine 9173
D:/myGo/pkg/mod/github.com/apache/pulsar-client-go@v0.17.0/pulsar/consumer_partition.go:460 +0x161fI think MessageReceived in consumer_partition.go may be the problem.
The for loop in MessageReceived may just continue instead of adding a element in the messages in some situation.
we may add some codes before adding to queueCh at the end. of MessageReceived like:
if (len(messages) == 0){
return nil
}
// send messages to the dispatcher
pc.queueCh <- messages
return nilSteps to reproduce
How can we reproduce the issue
create 100 topic.
For each topic , create a producer and a consumer. Keep consuming messages.
While reset the cursor with timestamp infinitely.
System configuration
Pulsar version: 2.6.x
pulsar-client-go 0.17.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels