undo update size allocate
Some checks failed
automerge / automerge (pull_request) Has been skipped
dependabot-automerge / automerge (pull_request) Has been skipped
autoapprove / autoapprove (pull_request) Successful in 6s
codeql / analyze (go) (pull_request) Has been cancelled
prbuild / test (pull_request) Has been cancelled
prbuild / lint (pull_request) Has been cancelled

This commit is contained in:
Денис Евстигнеев 2024-11-21 22:21:57 +03:00
parent c4d6924efe
commit 3ceffd88d0

View File

@ -54,7 +54,7 @@ func (m *hookTracer) OnProduceRecordBuffered(r *kgo.Record) {
omd, ok := metadata.FromOutgoingContext(r.Context) omd, ok := metadata.FromOutgoingContext(r.Context)
if !ok { if !ok {
omd = metadata.New(0) omd = metadata.New(len(r.Headers))
} }
md := metadata.Copy(omd) md := metadata.Copy(omd)
@ -121,7 +121,7 @@ func (m *hookTracer) OnFetchRecordBuffered(r *kgo.Record) {
} }
omd, ok := metadata.FromIncomingContext(r.Context) omd, ok := metadata.FromIncomingContext(r.Context)
if !ok { if !ok {
omd = metadata.New(0) omd = metadata.New(len(r.Headers))
} }
md := metadata.Copy(omd) md := metadata.Copy(omd)