Skip to content

Commit

Permalink
Revert "Compress/Encrypt Blocks in the background (#1227)" (#1409)
Browse files Browse the repository at this point in the history
This reverts commit b13b927.
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

This commit had some conflicts. See PR description for details.
  • Loading branch information
Ibrahim Jarif committed Oct 2, 2020
1 parent 0cff38a commit f198dc7
Show file tree
Hide file tree
Showing 8 changed files with 116 additions and 293 deletions.
9 changes: 6 additions & 3 deletions db2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -670,13 +670,16 @@ func TestL0GCBug(t *testing.T) {
// Simulate a crash by not closing db1 but releasing the locks.
if db1.dirLockGuard != nil {
require.NoError(t, db1.dirLockGuard.release())
db1.dirLockGuard = nil
}
if db1.valueDirGuard != nil {
require.NoError(t, db1.valueDirGuard.release())
db1.valueDirGuard = nil
}
require.NoError(t, db1.Close())
for _, f := range db1.vlog.filesMap {
require.NoError(t, f.fd.Close())
}
require.NoError(t, db1.registry.Close())
require.NoError(t, db1.lc.close())
require.NoError(t, db1.manifest.close())

db2, err := Open(opts)
require.NoError(t, err)
Expand Down
1 change: 0 additions & 1 deletion options.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ func DefaultOptions(path string) Options {

func buildTableOptions(opt Options) table.Options {
return table.Options{
TableSize: uint64(opt.MaxTableSize),
BlockSize: opt.BlockSize,
BloomFalsePositive: opt.BloomFalsePositive,
LoadBloomsOnOpen: opt.LoadBloomsOnOpen,
Expand Down
Loading

0 comments on commit f198dc7

Please sign in to comment.