Fix `DBImpl::GetColumnFamilyHandleUnlocked` data race (#4666)
Summary: Hi, yiwu-arbug, I found that `DBImpl::GetColumnFamilyHandleUnlocked` still have data race condition, because `column_family_memtables_` has a stateful cache `current_` and `column_family_memtables_::Seek` maybe call without the protection of `mutex_` by a write thread checkmain859dbda6e3/db/write_batch.cc (L1188)
and859dbda6e3/db/write_batch.cc (L1756)
and859dbda6e3/db/db_impl_write.cc (L318)
So it's better to use `versions_->GetColumnFamilySet()->GetColumnFamily` instead. Pull Request resolved: https://github.com/facebook/rocksdb/pull/4666 Differential Revision: D13027117 Pulled By: yiwu-arbug fbshipit-source-id: 4e3778eaf8e7f7c8577bbd78129b6a5fd7ce79fb
parent
d761857d56
commit
09426ae1c7
Loading…
Reference in new issue