Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gunli committed Aug 30, 2023
1 parent ea0724e commit 6a89ca3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pulsar/producer_partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,8 @@ func (p *partitionProducer) internalSend(sr *sendRequest) {
p.internalFlushCurrentBatch()

// after flushing try again to add the current payload
ok := addRequestToBatch(smm, p, sr.uncompressedPayload, sr, sr.msg, sr.deliverAt, sr.schemaVersion, multiSchemaEnabled)
ok := addRequestToBatch(smm, p, sr.uncompressedPayload, sr, sr.msg, sr.deliverAt,
sr.schemaVersion, multiSchemaEnabled)
if !ok {
p.log.WithField("size", sr.uncompressedSize).
WithField("properties", sr.msg.Properties).
Expand Down Expand Up @@ -1574,12 +1575,12 @@ func (p *partitionProducer) _getConn() internal.Connection {
return p.conn.Load().(internal.Connection)
}

func (p *partitionProducer) releaseSemaphoreAndMem(size int64) {
func (p *partitionProducer) releaseSemaphoreAndMem(size int64) { //nolint:unused
p.publishSemaphore.Release()
p.client.memLimit.ReleaseMemory(size)
}

func (p *partitionProducer) canAddToQueue(sr *sendRequest) bool {
func (p *partitionProducer) canAddToQueue(sr *sendRequest) bool { //nolint:unused
if p.options.DisableBlockIfQueueFull {
if !p.publishSemaphore.TryAcquire() {
runCallback(sr.callback, nil, sr.msg, errSendQueueIsFull)
Expand All @@ -1595,7 +1596,7 @@ func (p *partitionProducer) canAddToQueue(sr *sendRequest) bool {
return true
}

func (p *partitionProducer) canReserveMem(sr *sendRequest, size int64) bool {
func (p *partitionProducer) canReserveMem(sr *sendRequest, size int64) bool { //nolint:unused
if p.options.DisableBlockIfQueueFull {
if !p.client.memLimit.TryReserveMemory(size) {
p.publishSemaphore.Release()
Expand Down

0 comments on commit 6a89ca3

Please sign in to comment.