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 2022/12/02 16:38:20 UTC

[GitHub] [pulsar-client-go] flowchartsman opened a new issue, #897: Flush on unbatched producer panics

flowchartsman opened a new issue, #897:
URL: https://github.com/apache/pulsar-client-go/issues/897

   ```go
   producer, err := client.CreateProducer(ProducerOptions{
   	Topic:           newTopicName(),
   	DisableBatching: true,
   })
   ID, err := producer.Send(context.Background(), &ProducerMessage{
   	Payload: []byte("hello"),
   })
   producer.Flush()
   ```
   
   ```
   [signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x1005cf756]
   
   goroutine 13 [running]:
   github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).internalFlushCurrentBatch(0xc0007bc240)
           /Users/me/go/pkg/mod/github.com/apache/pulsar-client-go@v0.9.1-0.20221129090243-884e13ecf0a1/pulsar/producer_partition.go:810 +0x36
   github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).internalFlush(0xc0007bc240, 0xc0006d6018)
           /Users/me/go/pkg/mod/github.com/apache/pulsar-client-go@v0.9.1-0.20221129090243-884e13ecf0a1/pulsar/producer_partition.go:992 +0x3e
   github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).runEventsLoop(0xc0007bc240)
           /Users/me/go/pkg/mod/github.com/apache/pulsar-client-go@v0.9.1-0.20221129090243-884e13ecf0a1/pulsar/producer_partition.go:452 +0x114
   created by github.com/apache/pulsar-client-go/pulsar.newPartitionProducer
           /Users/me/go/pkg/mod/github.com/apache/pulsar-client-go@v0.9.1-0.20221129090243-884e13ecf0a1/pulsar/producer_partition.go:201 +0xaf6
   ```
   #### Expected behavior
   
   NOP?
   
   #### Actual behavior
   
   Panic
   
   This is because `partitionProducer.internalFlushCurrentBatch()` is called without checking to see if `partitionProducer.batchBuilder` is nil.
   


-- 
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: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-go] flowchartsman commented on issue #897: Flush on unbatched producer panics

Posted by "flowchartsman (via GitHub)" <gi...@apache.org>.
flowchartsman commented on issue #897:
URL: https://github.com/apache/pulsar-client-go/issues/897#issuecomment-1664626132

   This issue was duplicated by #1064 and fixed by #1065. Closing this as superceded.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-client-go] flowchartsman closed issue #897: Flush on unbatched producer panics

Posted by "flowchartsman (via GitHub)" <gi...@apache.org>.
flowchartsman closed issue #897: Flush on unbatched producer panics
URL: https://github.com/apache/pulsar-client-go/issues/897


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org