The ztsd needs to be version bumped, to be consistent with dgraph, and more specifically use the patched version v1.4.5+patch2 in both badger and dgraph.
The semantic versioning of this release is a bit particular since it only includes changes in the Go wrapper without any changes from the upstream C repository (https://github.com/facebook/zstd/releases).
Changes:
- Pass pointers to C as unsafe.Pointer, not uintptr (memory corruption) @evanj (#91)
- Add go.mod file @Viq111 (#94)
- [circleci] Fix 32 bits builds @Viq111 (#92)
This is a recommended version as it fixes a potential memory corruption bug when the system is under-pressure (memory and/or lots of threads) which forces the Go runtime to move the stack around.
What version of Go are you using (go version)?
go version go1.16 linux/amd64
What operating system are you using?
Ubuntu 20.04.2 LTS
What version of Badger are you using?
6c35ad6c28e0(referenced from dgraphgo.mod)
Does this issue reproduce with the latest master?
yes
Steps to Reproduce the issue
grep ztsd go.mod
What Badger options were set?
n/a - set in dgraph
What did you do?
n/a - compile badger
What did you expect to see?
updated patched version of ztsd
What did you see instead?
older version of ztsd