diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2014-02-28 14:26:22 +1100 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2014-02-28 14:26:22 +1100 |
commit | 29c9412ec31962b153cff9d0afa3af12084df1c7 (patch) | |
tree | 1f2a747049f9768965451c26a6859c8915b753c1 | |
parent | 69a3a5a410e27e9ef4ab269077e31cd8e2648d0c (diff) | |
download | mongo-29c9412ec31962b153cff9d0afa3af12084df1c7.tar.gz |
Have LSM compact logic match regular merges exactly: always create Bloom filters first. If there are any concurrent reads in the tree, they will benefit from the Bloom filters, and this avoids having different paths through the merge code.
-rw-r--r-- | src/lsm/lsm_merge.c | 5 | ||||
-rw-r--r-- | src/lsm/lsm_worker.c | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/lsm/lsm_merge.c b/src/lsm/lsm_merge.c index 543f73063a6..66681148192 100644 --- a/src/lsm/lsm_merge.c +++ b/src/lsm/lsm_merge.c @@ -111,8 +111,7 @@ __wt_lsm_merge( continue; if (F_ISSET(chunk, WT_LSM_CHUNK_BLOOM)) break; - else if ((FLD_ISSET(lsm_tree->bloom, WT_LSM_BLOOM_OFF) || - F_ISSET(lsm_tree, WT_LSM_TREE_COMPACTING)) && + else if (FLD_ISSET(lsm_tree->bloom, WT_LSM_BLOOM_OFF) || F_ISSET(chunk, WT_LSM_CHUNK_ONDISK)) break; } @@ -154,7 +153,7 @@ __wt_lsm_merge( break; WT_ASSERT(session, F_ISSET(chunk, WT_LSM_CHUNK_BLOOM) || - F_ISSET(lsm_tree, WT_LSM_TREE_COMPACTING) || + FLD_ISSET(lsm_tree->bloom, WT_LSM_BLOOM_OFF) || start_chunk == 1); /* diff --git a/src/lsm/lsm_worker.c b/src/lsm/lsm_worker.c index a7f53bb260b..29f6ea31271 100644 --- a/src/lsm/lsm_worker.c +++ b/src/lsm/lsm_worker.c @@ -123,8 +123,7 @@ __wt_lsm_merge_worker(void *vargs) session->dhandle = NULL; /* Try to create a Bloom filter. */ - if (!F_ISSET(lsm_tree, WT_LSM_TREE_COMPACTING) && - __lsm_bloom_work(session, lsm_tree) == 0) + if (__lsm_bloom_work(session, lsm_tree) == 0) progress = 1; /* If we didn't create a Bloom filter, try to merge. */ |