Fix(OOM): Use z.Allocator for Stream (#1611)
* Let's use allocator again
* Switch to z.NumAllocBytes
* Make stream work with both another Badger DB or with a file to backup.
* Add a test for Allocator
* Use allocator for Backup
* Bring in latest Ristretto
Co-authored-by: Daniel Mai <[email protected]>
diff --git a/stream_test.go b/stream_test.go
index 1bc7b97..35787c7 100644
--- a/stream_test.go
+++ b/stream_test.go
@@ -300,8 +300,7 @@
if err != nil {
return nil, err
}
- kv := itr.NewKV()
- *kv = pb.KV{
+ kv := &pb.KV{
Key: y.Copy(item.Key()),
Value: val,
}