You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "gunli (via GitHub)" <gi...@apache.org> on 2025/02/24 01:58:31 UTC
[I] [Bug][Connection] Potential data/write conflict [pulsar-client-go]
gunli opened a new issue, #1335:
URL: https://github.com/apache/pulsar-client-go/issues/1335
#### Expected behavior
write calls of one connection should be sequential
#### Actual behavior
write calls of one connection are invoked in 2 goroutine, which may lead to data/write conflict
#### Steps to reproduce
Code review:
```go
go func() {
for {
select {
case <-c.closeCh:
c.failLeftRequestsWhenClose()
return
case req := <-c.incomingRequestsCh:
if req == nil {
return // TODO: this never gonna be happen
}
c.internalSendRequest(req)
}
}
}()
for {
select {
case <-c.closeCh:
return
case cmd := <-c.incomingCmdCh:
c.internalReceivedCommand(cmd.cmd, cmd.headersAndPayload)
case data := <-c.writeRequestsCh:
if data == nil {
return
}
c.internalWriteData(data)
case <-pingSendTicker.C:
c.sendPing()
}
}
```
`c.internalSendRequest(req)` and `c.internalWriteData(data)/c.sendPing()` are invoked in 2 goroutines, and they will call `c.cnx.Write()` finally.
#### System configuration
**Pulsar version**: x.y
--
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
Re: [I] [Bug][Connection] Potential data/write conflicts [pulsar-client-go]
Posted by "crossoverJie (via GitHub)" <gi...@apache.org>.
crossoverJie closed issue #1335: [Bug][Connection] Potential data/write conflicts
URL: https://github.com/apache/pulsar-client-go/issues/1335
--
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