diff options
author | Michael Cahill <michael.cahill@mongodb.com> | 2015-10-02 10:39:17 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2015-10-02 10:39:17 +1000 |
commit | 5c32a0bee76ec0fd09722b80b40825a272cb46e9 (patch) | |
tree | 6fbd136faa32d70bc16dff05c1f4e45b44976f6b | |
parent | 0e0d19dec8ab89b82f97c355f0b7ae9c19656a1d (diff) | |
download | mongo-5c32a0bee76ec0fd09722b80b40825a272cb46e9.tar.gz |
Complete SERVER-16902 backport: in-memory splits during checkpoints.mongodb-3.0.7
This change was partially backported already via changes to
__wt_page_can_split, make it work for real.
-rw-r--r-- | src/btree/bt_split.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/btree/bt_split.c b/src/btree/bt_split.c index be7dc27c8b0..12f86925849 100644 --- a/src/btree/bt_split.c +++ b/src/btree/bt_split.c @@ -825,6 +825,12 @@ __split_parent_lock( F_CLR_ATOMIC(parent, WT_PAGE_SPLIT_LOCKED); continue; } + /* + * If a checkpoint is running and we fail to lock the parent + * page, give up immmediately to avoid deadlock. + */ + if (S2BT(session)->checkpointing) + return (EBUSY); __wt_yield(); } |