summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2016-02-19 15:33:56 +1100
committerMichael Cahill <michael.cahill@mongodb.com>2016-02-19 15:33:56 +1100
commit2b78ad8a6bd446d06d1a453198b68befed57fbe5 (patch)
tree96819ff82a0cb0f13f130d9b9e5057e6068bd336
parent7a6125e055215df43398a8eeafd71711e0cb4480 (diff)
parent93dac5e896f6747adefad7cf46d0bf847fa3dc75 (diff)
downloadmongo-2b78ad8a6bd446d06d1a453198b68befed57fbe5.tar.gz
Merge pull request #2505 from wiredtiger/wt-2411
WT-2411 Drop the checkpoint lock when LSM is draining its queue.
-rw-r--r--src/include/schema.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/include/schema.h b/src/include/schema.h
index 1e4e4fde81f..f93c596e2ca 100644
--- a/src/include/schema.h
+++ b/src/include/schema.h
@@ -174,6 +174,8 @@ struct __wt_table {
*/
#define WT_WITHOUT_LOCKS(session, op) do { \
WT_CONNECTION_IMPL *__conn = S2C(session); \
+ bool __checkpoint_locked = \
+ F_ISSET(session, WT_SESSION_LOCKED_CHECKPOINT); \
bool __handle_locked = \
F_ISSET(session, WT_SESSION_LOCKED_HANDLE_LIST); \
bool __table_locked = \
@@ -192,7 +194,15 @@ struct __wt_table {
F_CLR(session, WT_SESSION_LOCKED_SCHEMA); \
__wt_spin_unlock(session, &__conn->schema_lock); \
} \
+ if (__checkpoint_locked) { \
+ F_CLR(session, WT_SESSION_LOCKED_CHECKPOINT); \
+ __wt_spin_unlock(session, &__conn->checkpoint_lock); \
+ } \
op; \
+ if (__checkpoint_locked) { \
+ __wt_spin_lock(session, &__conn->checkpoint_lock); \
+ F_SET(session, WT_SESSION_LOCKED_CHECKPOINT); \
+ } \
if (__schema_locked) { \
__wt_spin_lock(session, &__conn->schema_lock); \
F_SET(session, WT_SESSION_LOCKED_SCHEMA); \