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

Differences in write option between leveldb and pebble. #29088

Closed
will-2012 opened this issue Feb 26, 2024 · 2 comments
Closed

Differences in write option between leveldb and pebble. #29088

will-2012 opened this issue Feb 26, 2024 · 2 comments

Comments

@will-2012
Copy link

LevelDB write option in ethdb/leveldb/leveldb.go:

// Put inserts the given value into the key-value store.
func (db *Database) Put(key []byte, value []byte) error {
	return db.db.Put(key, value, nil)
}

PebbleDB write option in ethdb/pebble/pebble.go:

// Put inserts the given value into the key-value store.
func (d *Database) Put(key []byte, value []byte) error {
	d.quitLock.RLock()
	defer d.quitLock.RUnlock()
	if d.closed {
		return pebble.ErrClosed
	}
	return d.db.Set(key, value, d.writeOptions)
}

The option is not specified in leveldb engine, the default writing mode is async, And the option is specified in pebble engine, the default writing mode is sync. Please correct me if I understand wrong.

@karalabe
Copy link
Member

karalabe commented Feb 26, 2024

Leveldb was kind of left in for legacy purposes until everyone migrates over to Pebble. Whilst there's no particular reason to forcefully drop LevelDB, we also stopped maintaining it. The upstream project (go-leveldb) was abandoned, the latest upstream code is unstable, they stopped accepting out fixes. At this point we just can't really care about it any more.

@will-2012
Copy link
Author

#27615

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants