From 779fb1fe5f1c17c500484d0dde35dcb69df81e4e Mon Sep 17 00:00:00 2001 From: Brad Greenlee Date: Wed, 21 Dec 2022 03:48:59 -0800 Subject: [PATCH] fix(zstd): default back to GOMAXPROCS concurrency (#2404) An upstream change in klauspost/compress#498 changed the default decoder concurrency from GOMAXPROCS to a maximum of 4. Explicitly pass a value of 0 via WithDecoderConcurrency so that GOMAXPROCS is used by default again. --- zstd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zstd.go b/zstd.go index f28db806e..6073ce7c4 100644 --- a/zstd.go +++ b/zstd.go @@ -57,7 +57,7 @@ func getDecoder(params ZstdDecoderParams) *zstd.Decoder { } // It's possible to race and create multiple new readers. // Only one will survive GC after use. - zstdDec, _ := zstd.NewReader(nil) + zstdDec, _ := zstd.NewReader(nil, zstd.WithDecoderConcurrency(0)) zstdDecMap.Store(params, zstdDec) return zstdDec }