You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by we...@apache.org on 2021/04/14 02:12:01 UTC
[rocketmq-client-go] branch master updated: Fix the zlibWriterPools
doesn't work leads to high memory usage (#645)
This is an automated email from the ASF dual-hosted git repository.
wenfeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-go.git
The following commit(s) were added to refs/heads/master by this push:
new fa21664 Fix the zlibWriterPools doesn't work leads to high memory usage (#645)
fa21664 is described below
commit fa2166402fdba56f01612559378b84e33023865b
Author: cserwen <cs...@163.com>
AuthorDate: Wed Apr 14 10:11:51 2021 +0800
Fix the zlibWriterPools doesn't work leads to high memory usage (#645)
Co-authored-by: dengzhiwen1 <de...@xiaomi.com>
---
internal/utils/compression.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/internal/utils/compression.go b/internal/utils/compression.go
index 4ad2ced..379cdf2 100644
--- a/internal/utils/compression.go
+++ b/internal/utils/compression.go
@@ -53,7 +53,7 @@ func Compress(raw []byte, compressLevel int) ([]byte, error) {
buf := bufPool.Get().(*bytes.Buffer)
defer bufPool.Put(buf)
- writerPool := zlibWriterPools[compressLevel-1]
+ writerPool := &zlibWriterPools[compressLevel-1]
writer := writerPool.Get().(*zlib.Writer)
defer writerPool.Put(writer)
buf.Reset()