facebook / facebook/rocksdb

maybe a bug

Open
#5,094 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
32.1k
Forks
6.9k
Avg merge
32m
Merged PRs (30d)
1

Description

> Note: Please use Issues only for bug reports. For questions, discussions, feature requests, etc. post to dev group: https://www.facebook.com/groups/rocksdb.dev

### Expected behavior
when the write leader is blocked on the write stop, the thead will wait for the BG job to send bg_cv_ Signal after the BG job finished.
### Actual behavior
the write will be stopped for ever, no BG job will send the siganl. because when the writer enter to stop,there is no BG job is doing.
### Steps to reproduce the behavior
thread BG job is doing
thread writer check write_controller_.IsStopped ==true
thread BG job is finished
thread writer enter to wait signal

![image](https://user-images.githubusercontent.com/15257278/54812987-6b112780-4cc7-11e9-9835-4c9d99065110.png)

![image](https://user-images.githubusercontent.com/15257278/54813171-ef63aa80-4cc7-11e9-970e-df499ab91c14.png)

#0 0x00007f8475bd26d5 in pthread_cond_wait@@GLIBC_2.3.2 () from /var/chroot/mongodb/lib64/libpthread.so.0
#1 0x00007f8477a7481d in rocksdb::port::CondVar::Wait() () from /var/chroot/mongodb/lib64/librocksdb.so.5.1
#2 0x00007f8477af4cd8 in rocksdb::InstrumentedCondVar::Wait() () from /var/chroot/mongodb/lib64/librocksdb.so.5.1
#3 0x00007f84779a9b80 in rocksdb::DBImpl::DelayWrite(unsigned long, rocksdb::WriteOptions const&) () from /var/chroot/mongodb/lib64/librocksdb.so.5.1
#4 0x00007f84779d2207 in rocksdb::DBImpl::WriteImpl(rocksdb::WriteOptions const&, rocksdb::WriteBatch*, rocksdb::WriteCallback*, unsigned long*, unsigned long, bool) () from /var/chroot/mongodb/lib64/librocksdb.so.5.1
#5 0x00007f84779d285b in rocksdb::DBImpl::Write(rocksdb::WriteOptions const&, rocksdb::WriteBatch*) () from /var/chroot/mongodb/lib64/librocksdb.so.5.1
#6 0x00007f84779d2986 in rocksdb::DB::Put(rocksdb::WriteOptions const&, rocksdb::ColumnFamilyHandle*, rocksdb::Slice const&, rocksdb::Slice const&) () from /var/chroot/mongodb/lib64/librocksdb.so.5.1
#7 0x00007f84779d2a35 in rocksdb::DBImpl::Put(rocksdb::WriteOptions const&, rocksdb::ColumnFamilyHandle*, rocksdb::Slice const&, rocksdb::Slice const&) () from /var/chroot/mongodb/lib64/librocksdb.so.5.1
#8 0x000055fcc400bd59 in rocksdb::DB::Put(rocksdb::WriteOptions const&, rocksdb::Slice const&, rocksdb::Slice const&) ()

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.