Skip to content

Commit

Permalink
Revert "ethdb/pebble: cap memory table size as maxMemTableSize-1 (eth…
Browse files Browse the repository at this point in the history
…ereum#28444)"

This reverts commit cc68033.
  • Loading branch information
devopsbo3 authored Nov 10, 2023
1 parent 5be5a95 commit 0daab84
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions ethdb/pebble/pebble.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,8 @@ func New(file string, cache int, handles int, namespace string, readonly bool, e
// including a frozen memory table and another live one.
memTableLimit := 2
memTableSize := cache * 1024 * 1024 / 2 / memTableLimit

// The memory table size is currently capped at maxMemTableSize-1 due to a
// known bug in the pebble where maxMemTableSize is not recognized as a
// valid size.
//
// TODO use the maxMemTableSize as the maximum table size once the issue
// in pebble is fixed.
if memTableSize >= maxMemTableSize {
memTableSize = maxMemTableSize - 1
if memTableSize > maxMemTableSize {
memTableSize = maxMemTableSize
}
db := &Database{
fn: file,
Expand Down

0 comments on commit 0daab84

Please sign in to comment.