Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffer pool for decompression #1308

Merged
merged 21 commits into from
May 13, 2020
Merged

Buffer pool for decompression #1308

merged 21 commits into from
May 13, 2020

Conversation

jarifibrahim
Copy link
Contributor

@jarifibrahim jarifibrahim commented Apr 17, 2020

This PR is an attempt to reduce the memory usage of decompression. This PR uses a sync pool to hold decompression buffers. A buffer is added to the pool only if was used for decompression. We don't want to put buffers that were not used for decompression because these buffers are read from mmaped SST files and any changes to these buffers would lead to a segfault.

Fixes #1239


This change is Reviewable

table/iterator.go Outdated Show resolved Hide resolved
@jarifibrahim jarifibrahim marked this pull request as ready for review April 17, 2020 11:21
gja
gja previously requested changes Apr 17, 2020
table/table.go Outdated Show resolved Hide resolved
table/iterator.go Outdated Show resolved Hide resolved
@jarifibrahim jarifibrahim changed the title Buffer pool for decompression [Do Not Review] Buffer pool for decompression Apr 22, 2020
Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 3 files reviewed, 6 unresolved discussions (waiting on @ashish-goswami, @jarifibrahim, and @manishrjain)


table/iterator.go, line 320 at r3 (raw file):

			decompressPool.Put(&itr.bi.data)
		}
		itr.bi.data = nil

Set nil before putting it into the pool.


table/iterator.go, line 351 at r3 (raw file):

			decompressPool.Put(&itr.bi.data)
		}
		itr.bi.data = nil

same here.


table/table.go, line 645 at r3 (raw file):

func (t *Table) decompressData(data []byte) ([]byte, error) {
	fmt.Println("Decompress111")
	dst := decompressPool.Get().(*[]byte)

Why not use y.Slice?

@jarifibrahim jarifibrahim changed the title [Do Not Review] Buffer pool for decompression Buffer pool for decompression May 9, 2020
Copy link
Contributor Author

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 4 files reviewed, 6 unresolved discussions (waiting on @ashish-goswami, @gja, @jarifibrahim, and @manishrjain)


table/iterator.go, line 109 at r2 (raw file):

Previously, gja (Tejas Dinkar) wrote…

this feels a bit weird that it's done in this way. Can't we keep a single buffer pool for both decompressed and regular data?

We cannot do that since the uncompressed buffers actually point to the mmapped file.


table/iterator.go, line 320 at r3 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

Set nil before putting it into the pool.

I've changed the implementation. This is no longer necessary.


table/iterator.go, line 351 at r3 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

same here.

I've changed the implementation. This is no longer necessary.


table/table.go, line 644 at r2 (raw file):

Previously, gja (Tejas Dinkar) wrote…

Another trick is to do

type BufferPool {
  // contains a sync.Pool internally
  Get() []bytes <- Clean out the buffer here
  Put([] bytes)
}

Done. Created a new type.


table/table.go, line 645 at r3 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

Why not use y.Slice?

y.Slice contains a []byte slice and I don't see any benefit from using y.slice.

Copy link
Contributor Author

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 2 of 4 files reviewed, 6 unresolved discussions (waiting on @ashish-goswami, @gja, @golangcibot, and @manishrjain)


table/builder.go, line 121 at r5 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

Probably don't need a special struct.

Done.


table/builder.go, line 125 at r5 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

I'd suggest using y.Slice.

Done.


table/iterator.go, line 109 at r1 (raw file):

Previously, golangcibot (Bot from GolangCI) wrote…

S1002: should omit comparison to bool constant, can be simplified to itr.compressed (from gosimple)

Done.


table/table.go, line 644 at r2 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

The way Go typically uses sync.Pool is directly -- that's how we do it in codebase as well. So, let's keep it consistent and use sync.Pool directly.

Done


table/table.go, line 174 at r5 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

if b, ok := ... ; ok { ... }

Done.

Copy link
Contributor Author

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dismissed @manishrjain, and @manishrjain from 6 discussions.
Reviewable status: 2 of 4 files reviewed, all discussions resolved (waiting on @ashish-goswami and @manishrjain)

@jarifibrahim jarifibrahim dismissed gja’s stale review May 13, 2020 12:56

All comments addressed

@jarifibrahim
Copy link
Contributor Author

@ashish-goswami tested this with Dgraph there is a reduction in the amount of memory allocated by the decompression.

@jarifibrahim jarifibrahim merged commit aadda9a into master May 13, 2020
@jarifibrahim jarifibrahim deleted the ibrahim/decompression-pool branch May 13, 2020 13:01
@ashish-goswami
Copy link
Contributor

Yes, I saw reduction in the allocated memory size after this change. However there was no change in the inuse memory size(even if you leave cluster idle for sometime). First it was shown as part of zstd.Decompression (without this change), with this change it was shown as syncPool.
Old profile:

Entering interactive mode (type "help" for commands, "o" for options)
(pprof) top
Showing nodes accounting for 2725.22MB, 95.26% of 2860.70MB total
Dropped 204 nodes (cum <= 14.30MB)
Showing top 10 nodes out of 113
      flat  flat%   sum%        cum   cum%
  903.07MB 31.57% 31.57%   903.07MB 31.57%  github.com/DataDog/zstd.Decompress
     612MB 21.39% 52.96%      612MB 21.39%  github.com/dgraph-io/badger/v2.(*oracle).newCommitTs
     276MB  9.65% 62.61%      276MB  9.65%  github.com/dgraph-io/badger/v2/table.NewTableBuilder
     256MB  8.95% 71.56%      256MB  8.95%  github.com/dgraph-io/ristretto.newCmRow
  169.53MB  5.93% 77.48%   200.03MB  6.99%  github.com/dgraph-io/dgraph/protos/pb.(*Mutations).Unmarshal
  166.41MB  5.82% 83.30%   166.41MB  5.82%  github.com/dgraph-io/badger/v2/skl.newArena
  165.50MB  5.79% 89.09%   165.50MB  5.79%  github.com/dgraph-io/ristretto/z.(*Bloom).Size
  105.06MB  3.67% 92.76%   144.15MB  5.04%  github.com/dgraph-io/badger/v2/table.OpenTable
   41.15MB  1.44% 94.20%    41.15MB  1.44%  github.com/dgraph-io/ristretto.(*lockedMap).Set
   30.50MB  1.07% 95.26%    30.50MB  1.07%  github.com/dgraph-io/dgraph/protos/pb.(*DirectedEdge).Unmarshal

New profile(with this change):

(pprof) top
Showing nodes accounting for 2618.54MB, 95.96% of 2728.65MB total
Dropped 101 nodes (cum <= 13.64MB)
Showing top 10 nodes out of 92
      flat  flat%   sum%        cum   cum%
  783.55MB 28.72% 28.72%   783.55MB 28.72%  github.com/dgraph-io/badger/v2/table.newSlicePool.func1
  613.53MB 22.48% 51.20%   613.53MB 22.48%  github.com/dgraph-io/badger/v2.(*oracle).newCommitTs
     345MB 12.64% 63.84%      345MB 12.64%  github.com/dgraph-io/badger/v2/table.NewTableBuilder
     256MB  9.38% 73.23%      256MB  9.38%  github.com/dgraph-io/ristretto.newCmRow
  200.41MB  7.34% 80.57%   200.41MB  7.34%  github.com/dgraph-io/ristretto/z.(*Bloom).Size
  166.41MB  6.10% 86.67%   166.41MB  6.10%  github.com/dgraph-io/badger/v2/skl.newArena
  105.79MB  3.88% 90.55%   172.46MB  6.32%  github.com/dgraph-io/badger/v2/table.OpenTable
   65.02MB  2.38% 92.93%    76.74MB  2.81%  github.com/DataDog/zstd.Decompress
   46.27MB  1.70% 94.62%    69.77MB  2.56%  github.com/dgraph-io/badger/v2/pb.(*TableIndex).Unmarshal
   36.56MB  1.34% 95.96%    36.56MB  1.34%  github.com/dgraph-io/ristretto.(*lockedMap).Set

jarifibrahim pushed a commit that referenced this pull request Jul 5, 2020
jarifibrahim pushed a commit that referenced this pull request Jul 10, 2020
jarifibrahim pushed a commit that referenced this pull request Jul 10, 2020
jarifibrahim pushed a commit that referenced this pull request Jul 10, 2020
This reverts commit aadda9a.

This commit is being reverted because we have seen some crashes
which could be caused by it. We haven't been able to reproduce the crashes yet.

Related to #1389, #1388, #1387
Also, see https://discuss.dgraph.io/t/current-state-of-badger-crashes/7602
jarifibrahim pushed a commit to dgraph-io/dgraph that referenced this pull request Jul 11, 2020
Also, disable conflict detection in badger to save memory.

```
0dfb8b4 Changelog for v20.07.0 (dgraph-io/badger#1411)
03ba278 Add missing changelog for v2.0.3 (dgraph-io/badger#1410)
6001230 Revert "Compress/Encrypt Blocks in the background (dgraph-io/badger#1227)" (dgraph-io/badger#1409)
800305e Revert "Buffer pool for decompression
(dgraph-io/badger#1308)"
(dgraph-io/badger#1408)
63d9309 Revert "fix: Fix race condition in block.incRef
(dgraph-io/badger#1337)"
(dgraph-io/badger#1407)
e0d058c Revert "add assert to check integer overflow for table size (dgraph-io/badger#1402)" (dgraph-io/badger#1406)
d981f47 return error if the vlog writes exceeds more that 4GB.
(dgraph-io/badger#1400)
7f4e4b5 add assert to check integer overflow for table size
(dgraph-io/badger#1402)
8e896a7 Add a contribution guide
(dgraph-io/badger#1379)
b79aeef Avoid panic on multiple closer.Signal calls
(dgraph-io/badger#1401)
717b89c Enable cross-compiled 32bit tests on TravisCI
(dgraph-io/badger#1392)
09dfa66 Update ristretto to commit f66de99
(dgraph-io/badger#1391)
509de73 Update head while replaying value log
(dgraph-io/badger#1372)
e013bfd Rework DB.DropPrefix (dgraph-io/badger#1381)
3042e37 pre allocate cache key for the block cache and the bloom filter cache (dgraph-io/badger#1371)
675efcd Increase default valueThreshold from 32B to 1KB
(dgraph-io/badger#1346)
158d927 Remove second initialization of writech in Open
(dgraph-io/badger#1382)
d37ce36 Tests: Use t.Parallel in TestIteratePrefix tests
(dgraph-io/badger#1377)
3f4761d Force KeepL0InMemory to be true when InMemory is true
(dgraph-io/badger#1375)
dd332b0 Avoid panic in filltables()
(dgraph-io/badger#1365)
c45d966 Fix assert in background compression and encryption.
(dgraph-io/badger#1366)
```
jarifibrahim pushed a commit to dgraph-io/dgraph that referenced this pull request Jul 11, 2020
This commit brings the following new changes from badger.
This commit also disable conflict detection in badger to save memory.
```
Fix assert in background compression and encryption. (dgraph-io/badger#1366)
Avoid panic in filltables() (dgraph-io/badger#1365)
Force KeepL0InMemory to be true when InMemory is true (dgraph-io/badger#1375)
Tests: Use t.Parallel in TestIteratePrefix tests (dgraph-io/badger#1377)
Remove second initialization of writech in Open (dgraph-io/badger#1382)
Increase default valueThreshold from 32B to 1KB (dgraph-io/badger#1346)
pre allocate cache key for the block cache and the bloom filter cache (dgraph-io/badger#1371)
Rework DB.DropPrefix (dgraph-io/badger#1381)
Update head while replaying value log (dgraph-io/badger#1372)
Update ristretto to commit f66de99 (dgraph-io/badger#1391)
Enable cross-compiled 32bit tests on TravisCI (dgraph-io/badger#1392)
Avoid panic on multiple closer.Signal calls (dgraph-io/badger#1401)
Add a contribution guide (dgraph-io/badger#1379)
add assert to check integer overflow for table size (dgraph-io/badger#1402)
return error if the vlog writes exceeds more that 4GB. (dgraph-io/badger#1400)
Revert "add assert to check integer overflow for table size (dgraph-io/badger#1402)" (dgraph-io/badger#1406)
Revert "fix: Fix race condition in block.incRef (dgraph-io/badger#1337)" (dgraph-io/badger#1407)
Revert "Buffer pool for decompression (dgraph-io/badger#1308)" (dgraph-io/badger#1408)
Revert "Compress/Encrypt Blocks in the background (dgraph-io/badger#1227)" (dgraph-io/badger#1409)
Add missing changelog for v2.0.3 (dgraph-io/badger#1410)
Changelog for v20.07.0 (dgraph-io/badger#1411)
```
jarifibrahim pushed a commit to dgraph-io/dgraph that referenced this pull request Jul 11, 2020
This commit brings following new changes from badger
This commit also disable conflict detection in badger to save memory.

```
Fix assert in background compression and encryption. (dgraph-io/badger#1366)
Avoid panic in filltables() (dgraph-io/badger#1365)
Force KeepL0InMemory to be true when InMemory is true (dgraph-io/badger#1375)
Tests: Use t.Parallel in TestIteratePrefix tests (dgraph-io/badger#1377)
Remove second initialization of writech in Open (dgraph-io/badger#1382)
Increase default valueThreshold from 32B to 1KB (dgraph-io/badger#1346)
pre allocate cache key for the block cache and the bloom filter cache (dgraph-io/badger#1371)
Rework DB.DropPrefix (dgraph-io/badger#1381)
Update head while replaying value log (dgraph-io/badger#1372)
Update ristretto to commit f66de99 (dgraph-io/badger#1391)
Enable cross-compiled 32bit tests on TravisCI (dgraph-io/badger#1392)
Avoid panic on multiple closer.Signal calls (dgraph-io/badger#1401)
Add a contribution guide (dgraph-io/badger#1379)
add assert to check integer overflow for table size (dgraph-io/badger#1402)
return error if the vlog writes exceeds more that 4GB. (dgraph-io/badger#1400)
Revert "add assert to check integer overflow for table size (dgraph-io/badger#1402)" (dgraph-io/badger#1406)
Revert "fix: Fix race condition in block.incRef (dgraph-io/badger#1337)" (dgraph-io/badger#1407)
Revert "Buffer pool for decompression (dgraph-io/badger#1308)" (dgraph-io/badger#1408)
Revert "Compress/Encrypt Blocks in the background (dgraph-io/badger#1227)" (dgraph-io/badger#1409)
Add missing changelog for v2.0.3 (dgraph-io/badger#1410)
Changelog for v20.07.0 (dgraph-io/badger#1411)
```
jarifibrahim pushed a commit to dgraph-io/dgraph that referenced this pull request Jul 11, 2020
This commit brings following new changes from badger
This commit also disable conflict detection in badger to save memory.

```
Fix assert in background compression and encryption. (dgraph-io/badger#1366)
Avoid panic in filltables() (dgraph-io/badger#1365)
Force KeepL0InMemory to be true when InMemory is true (dgraph-io/badger#1375)
Tests: Use t.Parallel in TestIteratePrefix tests (dgraph-io/badger#1377)
Remove second initialization of writech in Open (dgraph-io/badger#1382)
Increase default valueThreshold from 32B to 1KB (dgraph-io/badger#1346)
pre allocate cache key for the block cache and the bloom filter cache (dgraph-io/badger#1371)
Rework DB.DropPrefix (dgraph-io/badger#1381)
Update head while replaying value log (dgraph-io/badger#1372)
Update ristretto to commit f66de99 (dgraph-io/badger#1391)
Enable cross-compiled 32bit tests on TravisCI (dgraph-io/badger#1392)
Avoid panic on multiple closer.Signal calls (dgraph-io/badger#1401)
Add a contribution guide (dgraph-io/badger#1379)
add assert to check integer overflow for table size (dgraph-io/badger#1402)
return error if the vlog writes exceeds more that 4GB. (dgraph-io/badger#1400)
Revert "add assert to check integer overflow for table size (dgraph-io/badger#1402)" (dgraph-io/badger#1406)
Revert "fix: Fix race condition in block.incRef (dgraph-io/badger#1337)" (dgraph-io/badger#1407)
Revert "Buffer pool for decompression (dgraph-io/badger#1308)" (dgraph-io/badger#1408)
Revert "Compress/Encrypt Blocks in the background (dgraph-io/badger#1227)" (dgraph-io/badger#1409)
Add missing changelog for v2.0.3 (dgraph-io/badger#1410)
Changelog for v20.07.0 (dgraph-io/badger#1411)
```
jarifibrahim pushed a commit to dgraph-io/dgraph that referenced this pull request Jul 11, 2020
This commit brings following new changes from badger
This commit also disable conflict detection in badger to save memory.

```
Fix assert in background compression and encryption. (dgraph-io/badger#1366)
Avoid panic in filltables() (dgraph-io/badger#1365)
Force KeepL0InMemory to be true when InMemory is true (dgraph-io/badger#1375)
Tests: Use t.Parallel in TestIteratePrefix tests (dgraph-io/badger#1377)
Remove second initialization of writech in Open (dgraph-io/badger#1382)
Increase default valueThreshold from 32B to 1KB (dgraph-io/badger#1346)
pre allocate cache key for the block cache and the bloom filter cache (dgraph-io/badger#1371)
Rework DB.DropPrefix (dgraph-io/badger#1381)
Update head while replaying value log (dgraph-io/badger#1372)
Update ristretto to commit f66de99 (dgraph-io/badger#1391)
Enable cross-compiled 32bit tests on TravisCI (dgraph-io/badger#1392)
Avoid panic on multiple closer.Signal calls (dgraph-io/badger#1401)
Add a contribution guide (dgraph-io/badger#1379)
add assert to check integer overflow for table size (dgraph-io/badger#1402)
return error if the vlog writes exceeds more that 4GB. (dgraph-io/badger#1400)
Revert "add assert to check integer overflow for table size (dgraph-io/badger#1402)" (dgraph-io/badger#1406)
Revert "fix: Fix race condition in block.incRef (dgraph-io/badger#1337)" (dgraph-io/badger#1407)
Revert "Buffer pool for decompression (dgraph-io/badger#1308)" (dgraph-io/badger#1408)
Revert "Compress/Encrypt Blocks in the background (dgraph-io/badger#1227)" (dgraph-io/badger#1409)
Add missing changelog for v2.0.3 (dgraph-io/badger#1410)
Changelog for v20.07.0 (dgraph-io/badger#1411)
```
parasssh pushed a commit to dgraph-io/dgraph that referenced this pull request Jul 13, 2020
* Update badger to v20.07.0-rc1

This commit brings following new changes from badger
This commit also disable conflict detection in badger to save memory.

```
Fix assert in background compression and encryption. (dgraph-io/badger#1366)
Avoid panic in filltables() (dgraph-io/badger#1365)
Force KeepL0InMemory to be true when InMemory is true (dgraph-io/badger#1375)
Tests: Use t.Parallel in TestIteratePrefix tests (dgraph-io/badger#1377)
Remove second initialization of writech in Open (dgraph-io/badger#1382)
Increase default valueThreshold from 32B to 1KB (dgraph-io/badger#1346)
pre allocate cache key for the block cache and the bloom filter cache (dgraph-io/badger#1371)
Rework DB.DropPrefix (dgraph-io/badger#1381)
Update head while replaying value log (dgraph-io/badger#1372)
Update ristretto to commit f66de99 (dgraph-io/badger#1391)
Enable cross-compiled 32bit tests on TravisCI (dgraph-io/badger#1392)
Avoid panic on multiple closer.Signal calls (dgraph-io/badger#1401)
Add a contribution guide (dgraph-io/badger#1379)
add assert to check integer overflow for table size (dgraph-io/badger#1402)
return error if the vlog writes exceeds more that 4GB. (dgraph-io/badger#1400)
Revert "add assert to check integer overflow for table size (dgraph-io/badger#1402)" (dgraph-io/badger#1406)
Revert "fix: Fix race condition in block.incRef (dgraph-io/badger#1337)" (dgraph-io/badger#1407)
Revert "Buffer pool for decompression (dgraph-io/badger#1308)" (dgraph-io/badger#1408)
Revert "Compress/Encrypt Blocks in the background (dgraph-io/badger#1227)" (dgraph-io/badger#1409)
Add missing changelog for v2.0.3 (dgraph-io/badger#1410)
Changelog for v20.07.0 (dgraph-io/badger#1411)
```

* Remove unnecessary detect conflicts
parasssh pushed a commit to dgraph-io/dgraph that referenced this pull request Jul 13, 2020
* Update badger to v20.07.0-rc1

This commit brings the following new changes from badger.
This commit also disable conflict detection in badger to save memory.
```
Fix assert in background compression and encryption. (dgraph-io/badger#1366)
Avoid panic in filltables() (dgraph-io/badger#1365)
Force KeepL0InMemory to be true when InMemory is true (dgraph-io/badger#1375)
Tests: Use t.Parallel in TestIteratePrefix tests (dgraph-io/badger#1377)
Remove second initialization of writech in Open (dgraph-io/badger#1382)
Increase default valueThreshold from 32B to 1KB (dgraph-io/badger#1346)
pre allocate cache key for the block cache and the bloom filter cache (dgraph-io/badger#1371)
Rework DB.DropPrefix (dgraph-io/badger#1381)
Update head while replaying value log (dgraph-io/badger#1372)
Update ristretto to commit f66de99 (dgraph-io/badger#1391)
Enable cross-compiled 32bit tests on TravisCI (dgraph-io/badger#1392)
Avoid panic on multiple closer.Signal calls (dgraph-io/badger#1401)
Add a contribution guide (dgraph-io/badger#1379)
add assert to check integer overflow for table size (dgraph-io/badger#1402)
return error if the vlog writes exceeds more that 4GB. (dgraph-io/badger#1400)
Revert "add assert to check integer overflow for table size (dgraph-io/badger#1402)" (dgraph-io/badger#1406)
Revert "fix: Fix race condition in block.incRef (dgraph-io/badger#1337)" (dgraph-io/badger#1407)
Revert "Buffer pool for decompression (dgraph-io/badger#1308)" (dgraph-io/badger#1408)
Revert "Compress/Encrypt Blocks in the background (dgraph-io/badger#1227)" (dgraph-io/badger#1409)
Add missing changelog for v2.0.3 (dgraph-io/badger#1410)
Changelog for v20.07.0 (dgraph-io/badger#1411)
```

* Remove unnecessary detect conflicts
parasssh pushed a commit to dgraph-io/dgraph that referenced this pull request Jul 13, 2020
* Update badger to v20.07.0-rc1

This commit brings following new changes from badger
This commit also disable conflict detection in badger to save memory.

```
Fix assert in background compression and encryption. (dgraph-io/badger#1366)
Avoid panic in filltables() (dgraph-io/badger#1365)
Force KeepL0InMemory to be true when InMemory is true (dgraph-io/badger#1375)
Tests: Use t.Parallel in TestIteratePrefix tests (dgraph-io/badger#1377)
Remove second initialization of writech in Open (dgraph-io/badger#1382)
Increase default valueThreshold from 32B to 1KB (dgraph-io/badger#1346)
pre allocate cache key for the block cache and the bloom filter cache (dgraph-io/badger#1371)
Rework DB.DropPrefix (dgraph-io/badger#1381)
Update head while replaying value log (dgraph-io/badger#1372)
Update ristretto to commit f66de99 (dgraph-io/badger#1391)
Enable cross-compiled 32bit tests on TravisCI (dgraph-io/badger#1392)
Avoid panic on multiple closer.Signal calls (dgraph-io/badger#1401)
Add a contribution guide (dgraph-io/badger#1379)
add assert to check integer overflow for table size (dgraph-io/badger#1402)
return error if the vlog writes exceeds more that 4GB. (dgraph-io/badger#1400)
Revert "add assert to check integer overflow for table size (dgraph-io/badger#1402)" (dgraph-io/badger#1406)
Revert "fix: Fix race condition in block.incRef (dgraph-io/badger#1337)" (dgraph-io/badger#1407)
Revert "Buffer pool for decompression (dgraph-io/badger#1308)" (dgraph-io/badger#1408)
Revert "Compress/Encrypt Blocks in the background (dgraph-io/badger#1227)" (dgraph-io/badger#1409)
Add missing changelog for v2.0.3 (dgraph-io/badger#1410)
Changelog for v20.07.0 (dgraph-io/badger#1411)
```

* Remove unnecessary detect conflicts

Co-authored-by: parasssh <paras@dgraph.io>
parasssh pushed a commit to dgraph-io/dgraph that referenced this pull request Jul 13, 2020
* Update badger to v20.0.7-rc1

This commit brings following new changes from badger
This commit also disable conflict detection in badger to save memory.

```
Fix assert in background compression and encryption. (dgraph-io/badger#1366)
Avoid panic in filltables() (dgraph-io/badger#1365)
Force KeepL0InMemory to be true when InMemory is true (dgraph-io/badger#1375)
Tests: Use t.Parallel in TestIteratePrefix tests (dgraph-io/badger#1377)
Remove second initialization of writech in Open (dgraph-io/badger#1382)
Increase default valueThreshold from 32B to 1KB (dgraph-io/badger#1346)
pre allocate cache key for the block cache and the bloom filter cache (dgraph-io/badger#1371)
Rework DB.DropPrefix (dgraph-io/badger#1381)
Update head while replaying value log (dgraph-io/badger#1372)
Update ristretto to commit f66de99 (dgraph-io/badger#1391)
Enable cross-compiled 32bit tests on TravisCI (dgraph-io/badger#1392)
Avoid panic on multiple closer.Signal calls (dgraph-io/badger#1401)
Add a contribution guide (dgraph-io/badger#1379)
add assert to check integer overflow for table size (dgraph-io/badger#1402)
return error if the vlog writes exceeds more that 4GB. (dgraph-io/badger#1400)
Revert "add assert to check integer overflow for table size (dgraph-io/badger#1402)" (dgraph-io/badger#1406)
Revert "fix: Fix race condition in block.incRef (dgraph-io/badger#1337)" (dgraph-io/badger#1407)
Revert "Buffer pool for decompression (dgraph-io/badger#1308)" (dgraph-io/badger#1408)
Revert "Compress/Encrypt Blocks in the background (dgraph-io/badger#1227)" (dgraph-io/badger#1409)
Add missing changelog for v2.0.3 (dgraph-io/badger#1410)
Changelog for v20.07.0 (dgraph-io/badger#1411)
```

* Remove unnecessary detect conflicts

Co-authored-by: parasssh <paras@dgraph.io>
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 18, 2020
* Update badger to v20.07.0-rc1

This commit brings the following new changes from badger.
This commit also disable conflict detection in badger to save memory.
```
Fix assert in background compression and encryption. (dgraph-io/badger#1366)
Avoid panic in filltables() (dgraph-io/badger#1365)
Force KeepL0InMemory to be true when InMemory is true (dgraph-io/badger#1375)
Tests: Use t.Parallel in TestIteratePrefix tests (dgraph-io/badger#1377)
Remove second initialization of writech in Open (dgraph-io/badger#1382)
Increase default valueThreshold from 32B to 1KB (dgraph-io/badger#1346)
pre allocate cache key for the block cache and the bloom filter cache (dgraph-io/badger#1371)
Rework DB.DropPrefix (dgraph-io/badger#1381)
Update head while replaying value log (dgraph-io/badger#1372)
Update ristretto to commit f66de99 (dgraph-io/badger#1391)
Enable cross-compiled 32bit tests on TravisCI (dgraph-io/badger#1392)
Avoid panic on multiple closer.Signal calls (dgraph-io/badger#1401)
Add a contribution guide (dgraph-io/badger#1379)
add assert to check integer overflow for table size (dgraph-io/badger#1402)
return error if the vlog writes exceeds more that 4GB. (dgraph-io/badger#1400)
Revert "add assert to check integer overflow for table size (dgraph-io/badger#1402)" (dgraph-io/badger#1406)
Revert "fix: Fix race condition in block.incRef (dgraph-io/badger#1337)" (dgraph-io/badger#1407)
Revert "Buffer pool for decompression (dgraph-io/badger#1308)" (dgraph-io/badger#1408)
Revert "Compress/Encrypt Blocks in the background (dgraph-io/badger#1227)" (dgraph-io/badger#1409)
Add missing changelog for v2.0.3 (dgraph-io/badger#1410)
Changelog for v20.07.0 (dgraph-io/badger#1411)
```

* Remove unnecessary detect conflicts
manishrjain added a commit that referenced this pull request Aug 11, 2020
jarifibrahim pushed a commit that referenced this pull request Oct 2, 2020
This reverts commit aadda9a.

This commit is being reverted because we have seen some crashes
which could be caused by it. We haven't been able to reproduce the crashes yet.

Related to #1389, #1388, #1387
Also, see https://discuss.dgraph.io/t/current-state-of-badger-crashes/7602
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Decompression uses too much memory
5 participants