]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Use correct FileMeta for atomic flush result install (#4932)
authorYanqin Jin <yanqin@fb.com>
Thu, 31 Jan 2019 22:28:53 +0000 (14:28 -0800)
committerYanqin Jin <yanqin@fb.com>
Thu, 31 Jan 2019 23:06:26 +0000 (15:06 -0800)
commit65b229851093f1819b42b16784fd3668e32154d4
tree13605f6eebb9e1891c672d20d09d1afe172489a4
parentacba14b3d903bed94a3345c471bd62b282c84f33
Use correct FileMeta for atomic flush result install (#4932)

Summary:
1. this commit fixes our handling of a combination of two separate edge
cases. If a flush job does not pick any memtable to flush (because another
flush job has already picked the same memtables), and the column family
assigned to the flush job is dropped right before RocksDB calls
rocksdb::InstallMemtableAtomicFlushResults, our original code passes
a FileMetaData object whose file number is 0, failing the assertion in
rocksdb::InstallMemtableAtomicFlushResults (assert(m->GetFileNumber() > 0)).
2. Also piggyback a small change: since we already create a local copy of column family's mutable CF options to eliminate potential race condition with `SetOptions` call, we might as well use the local copy in other function calls in the same scope.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4932

Differential Revision: D13901322

Pulled By: riversand963

fbshipit-source-id: b936580af7c127ea0c6c19ea10cd5fcede9fb0f9
db/db_impl_compaction_flush.cc
db/flush_job_test.cc
db/memtable_list.cc
db/memtable_list.h
db/memtable_list_test.cc