Skip to content

Migrating nodes db from leveldb to pebble #33000

@MariusVanDerWijden

Description

@MariusVanDerWijden

During a recent debugging session I came across this:

1 @ 0x486aee 0x462ff7 0xc5f589 0x48f041# 0xc5f588 github.com/syndtr/goleveldb/leveldb.(*DB).compactionError+0x148 github.com/syndtr/[email protected]/leveldb/db_compaction.go:91

1 @ 0x486aee 0x462ff7 0xc64253 0x48f041
# 0xc64252 github.com/syndtr/goleveldb/leveldb.(*DB).mCompaction+0xf2 github.com/syndtr/[email protected]/leveldb/db_compaction.go:773

1 @ 0x486aee 0x462ff7 0xc64a97 0x48f041
# 0xc64a96 github.com/syndtr/goleveldb/leveldb.(*DB).tCompaction+0x6b6 github.com/syndtr/[email protected]/leveldb/db_compaction.go:836

1 @ 0x486aee 0x462ff7 0xc684dc 0x48f041
# 0xc684db github.com/syndtr/goleveldb/leveldb.(*DB).mpoolDrain+0x9b github.com/syndtr/[email protected]/leveldb/db_state.go:101

1 @ 0x486aee 0x462ff7 0xc7671c 0x48f041
# 0xc7671b github.com/syndtr/goleveldb/leveldb.(*session).refLoop+0x51b github.com/syndtr/[email protected]/leveldb/session_util.go:189

1 @ 0x486aee 0x462ff7 0xc8ce37 0x48f041
# 0xc8ce36 github.com/ethereum/go-ethereum/p2p/enode.(*DB).expirer+0xb6 github.com/ethereum/go-ethereum/p2p/enode/nodedb.go:315

4 go routines for goleveldb when the node is actually using pebble? After a bit of digging I noticed that our nodes db p2p/enode/nodedb.go still uses leveldb under the hood.
I think on the medium term we should probably move away from it in favor of pebble.
Just for reference, the nodes db on my node is ~15MB, so even leveldb should not have any issues handling it, so this is more for cleanup than actually improvment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions