]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
fix hanging after CompactFiles with L0 overlap
authorAndrew Kryczka <andrewkr@fb.com>
Wed, 13 Sep 2017 22:31:34 +0000 (15:31 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 13 Sep 2017 22:41:38 +0000 (15:41 -0700)
commit464fb36de939d0c32fd3ad6ce25e6e63b35fc5c3
tree3e49bf1094152b0350dadcdba325bd010dff373c
parent09713a64b3aef75ef463bc44f749f02797d7df93
fix hanging after CompactFiles with L0 overlap

Summary:
Bug report: https://www.facebook.com/groups/rocksdb.dev/permalink/1389452781153232/

Non-empty `level0_compactions_in_progress_` was aborting `CompactFiles` after incrementing `bg_compaction_scheduled_`, and in that case we never decremented it. This blocked future compactions and prevented DB close as we wait for scheduled compactions to finish/abort during close.

I eliminated `CompactFiles`'s dependency on `level0_compactions_in_progress_`. Since it takes a contiguous span of L0 files -- through the last L0 file if any L1+ files are included -- it's fine to run in parallel with other compactions involving L0. We make the same assumption in intra-L0 compaction.
Closes https://github.com/facebook/rocksdb/pull/2849

Differential Revision: D5780440

Pulled By: ajkr

fbshipit-source-id: 15b15d3faf5a699aed4b82a58352d4a7bb23e027
db/compaction_picker.cc
db/compaction_picker.h
db/db_compaction_test.cc
db/db_impl_compaction_flush.cc