Skip to content

Commit

Permalink
don't reuse cache
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzefovich committed Nov 12, 2021
1 parent d2debd7 commit c17884a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/sql/colcontainer/diskqueue.go
Original file line number Diff line number Diff line change
Expand Up @@ -587,11 +587,9 @@ func (d *diskQueue) Enqueue(ctx context.Context, b coldata.Batch) error {
d.serializer = nil
d.done = true
if d.cfg.CacheMode == DiskQueueCacheModeDefault {
// From this point on only Dequeues are allowed. Reuse the write
// side of the cache for reads.
d.writer.buffer.Reset()
d.scratchDecompressedReadBytes = d.writer.buffer.Bytes()
d.scratchDecompressedReadBytes = nil
d.writer.buffer = bytes.Buffer{}
d.writer.scratch.compressedBuf = nil
}
return nil
}
Expand Down

0 comments on commit c17884a

Please sign in to comment.