This is an automated email from the ASF dual-hosted git repository.
dinglei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-go.git
The following commit(s) were added to refs/heads/master by this push:
new 7d452fc fix trace messge batch more than batchSize (#1201)
7d452fc is described below
commit 7d452fc8d7f5355907584df636debacb706c1544
Author: wsy6543 <[email protected]>
AuthorDate: Tue Aug 19 20:46:22 2025 +0800
fix trace messge batch more than batchSize (#1201)
Co-authored-by: wushengyu <[email protected]>
---
internal/trace.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/internal/trace.go b/internal/trace.go
index 0901763..ecc903e 100644
--- a/internal/trace.go
+++ b/internal/trace.go
@@ -103,7 +103,7 @@ func (ctx *TraceContext) marshal2Bean() *TraceTransferBean {
} else {
buffer.WriteString(bean.Topic)
}
- //buffer.WriteString(bean.Topic)
+ // buffer.WriteString(bean.Topic)
buffer.WriteRune(contentSplitter)
buffer.WriteString(bean.MsgId)
buffer.WriteRune(contentSplitter)
@@ -358,9 +358,9 @@ func (td *traceDispatcher) process(maxWaitTime int64) {
case <-td.ticker.C:
delta := time.Since(lastput).Nanoseconds()
if delta > maxWaitTime {
- count++
lastput = time.Now()
if len(batch) > 0 {
+ count = 0
batchSend := batch
go primitive.WithRecover(func() {
td.batchCommit(batchSend)