Skip to content

Commit

Permalink
go/store/nbs: archive_build.go: PR feedback; pick up missed use of cm…
Browse files Browse the repository at this point in the history
…pBuff.
  • Loading branch information
reltuk committed Jan 3, 2025
1 parent fd1e026 commit 0eb812e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions go/store/nbs/archive_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,18 +382,17 @@ func writeDataToArchive(
case <-ctx.Done():
return 0, 0, 0, ctx.Err()
default:
var compressed []byte
dictId := uint32(0)

c, e2 := chunkCache.get(ctx, h, stats)
if e2 != nil {
return 0, 0, 0, e2
}

compressed = gozstd.CompressDict(cmpBuff, c.Data(), defaultDict)
cmpBuff = gozstd.CompressDict(cmpBuff[:0], c.Data(), defaultDict)
dictId = defaultSpanId

id, err := arcW.writeByteSpan(compressed)
id, err := arcW.writeByteSpan(cmpBuff)
if err != nil {
return 0, 0, 0, err
}
Expand Down

0 comments on commit 0eb812e

Please sign in to comment.