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/01/28 08:55:41 UTC
[GitHub] [pulsar-client-go] Shoothzj opened a new pull request #720: [optimize] Stop batchFlushTicker when Disable batching
Shoothzj opened a new pull request #720:
URL: https://github.com/apache/pulsar-client-go/pull/720
### Motivation
Disable batchFlushTicker when Disable batching, reduce cpu cost
### Modifications
Stop the batchFlushTicker when Disable batching
--
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] Shoothzj commented on pull request #720: [optimize] Stop batchFlushTicker when Disable batching
Posted by GitBox <gi...@apache.org>.
Shoothzj commented on pull request #720:
URL: https://github.com/apache/pulsar-client-go/pull/720#issuecomment-1024024796
This change is limit samllest change to the code.
Otherwise we can add a `if/else` in `func (p *partitionProducer) runEventsLoop()`
@wolfstudy
--
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] cckellogg commented on a change in pull request #720: [optimize] Stop batchFlushTicker when Disable batching
Posted by GitBox <gi...@apache.org>.
cckellogg commented on a change in pull request #720:
URL: https://github.com/apache/pulsar-client-go/pull/720#discussion_r802997548
##########
File path: pulsar/producer_partition.go
##########
@@ -126,6 +126,9 @@ func newPartitionProducer(client *client, topic string, options *ProducerOptions
metrics: metrics,
epoch: 0,
}
+ if p.options.DisableBatching {
+ p.batchFlushTicker.Stop()
Review comment:
Is it ok to call Stop() multiple times? There is a call to stop in the internal close.
--
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] wolfstudy merged pull request #720: [optimize] Stop batchFlushTicker when Disable batching
Posted by GitBox <gi...@apache.org>.
wolfstudy merged pull request #720:
URL: https://github.com/apache/pulsar-client-go/pull/720
--
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] Shoothzj commented on a change in pull request #720: [optimize] Stop batchFlushTicker when Disable batching
Posted by GitBox <gi...@apache.org>.
Shoothzj commented on a change in pull request #720:
URL: https://github.com/apache/pulsar-client-go/pull/720#discussion_r803268919
##########
File path: pulsar/producer_partition.go
##########
@@ -126,6 +126,9 @@ func newPartitionProducer(client *client, topic string, options *ProducerOptions
metrics: metrics,
epoch: 0,
}
+ if p.options.DisableBatching {
+ p.batchFlushTicker.Stop()
Review comment:
It's ok
--
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