Skip to content

Conversation

@mina86
Copy link
Contributor

@mina86 mina86 commented Jun 29, 2021

Per RocksDB FAQ:

Q: Is it safe to close RocksDB while another thread is issuing read,
write or manual compaction requests?
A: No. The users of RocksDB need to make sure all functions have
finished before they close RocksDB. You can speed up the waiting
by calling CancelAllBackgroundWork().

Better be safe than sorry so add the call before the rocksdb::DB object
is dropped.

Fixes: #3266

Copy link
Collaborator

@bowenwang1996 bowenwang1996 left a comment

Choose a reason for hiding this comment

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

@mina86 looks like the implementation is for feature single_thread_rocksdb, which is not enabled by default.

@mina86
Copy link
Contributor Author

mina86 commented Jun 30, 2021

D’oh. So now it turns out we need to update rocksdb to 0.16 to get this to work.

Per RocksDB FAQ:

> Q: Is it safe to close RocksDB while another thread is issuing read,
>    write or manual compaction requests?
> A: No.  The users of RocksDB need to make sure all functions have
>    finished before they close RocksDB.  You can speed up the waiting
>    by calling CancelAllBackgroundWork().

Better be safe than sorry so add the call before the rocksdb::DB object
is dropped.

Issue: near#3266
@bowenwang1996
Copy link
Collaborator

D’oh. So now it turns out we need to update rocksdb to 0.16 to get this to work.

Let's do that then

@mina86
Copy link
Contributor Author

mina86 commented Jul 1, 2021

Yep, already in review queue: #4442

@near-bulldozer near-bulldozer bot merged commit 14c547c into near:master Jul 9, 2021
@mina86 mina86 deleted the db branch July 29, 2021 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to shutdown neard cleanly

2 participants