diff options
author | Michael Cahill <michael.cahill@mongodb.com> | 2016-02-19 15:33:56 +1100 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2016-02-19 15:35:48 +1100 |
commit | 4f3828797f41cdd2e3118b1cd45c654491ff6c2d (patch) | |
tree | e0d4f4c1ed35ca70a392ef0cfe2d4e720d99db41 /src/include/schema.h | |
parent | ba5657d999a169bc7a61541b5f18690a3bed2dfc (diff) | |
download | mongo-4f3828797f41cdd2e3118b1cd45c654491ff6c2d.tar.gz |
Merge pull request #2505 from wiredtiger/wt-2411mongodb-3.3.2
WT-2411 Drop the checkpoint lock when LSM is draining its queue.
(cherry picked from commit 2b78ad8a6bd446d06d1a453198b68befed57fbe5)
Diffstat (limited to 'src/include/schema.h')
-rw-r--r-- | src/include/schema.h | 10 |
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); \ |