Skip to content

Commit

Permalink
Don't Reset bytesWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCutter committed Jul 19, 2024
1 parent 1249b20 commit 46930b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion storage/gcp/gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ func (s *Storage) updateEntryBundles(ctx context.Context, fromSeq uint64, entrie
// ... and prepare the next entry bundle for any remaining entries in the batch
bundleIndex++
entriesInBundle = 0
bundleWriter.Reset()
// Don't use Reset/Truncate here - the backing []bytes is still being used by goSetEntryBundle above.
bundleWriter = &bytes.Buffer{}
klog.V(1).Infof("Starting bundle idx %d", bundleIndex)
}
}
Expand Down

0 comments on commit 46930b4

Please sign in to comment.