summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gorrod <alexander.gorrod@mongodb.com>2016-03-18 14:54:10 +1100
committerAlex Gorrod <alexander.gorrod@mongodb.com>2016-03-18 14:54:10 +1100
commit903dee9fd5fbab6092929cfb3896f4ef9efcc889 (patch)
tree58503c12789be51965cda7d9b617b3dd393877a3
parentfd9840f0e9d4b132675d1ea318c930dafb989c68 (diff)
parent558672a31ded61187599dbf545a4e9f42ba0dd37 (diff)
downloadmongo-903dee9fd5fbab6092929cfb3896f4ef9efcc889.tar.gz
Merge pull request #2602 from wiredtiger/wt-2496-checkpoint-backup-race
WT-2496 Fix a race between checkpoint and starting a hot backup.
-rw-r--r--src/cursor/cur_backup.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cursor/cur_backup.c b/src/cursor/cur_backup.c
index b097a8c08aa..2fb0c464a76 100644
--- a/src/cursor/cur_backup.c
+++ b/src/cursor/cur_backup.c
@@ -140,8 +140,9 @@ __wt_curbackup_open(WT_SESSION_IMPL *session,
* Start the backup and fill in the cursor's list. Acquire the schema
* lock, we need a consistent view when creating a copy.
*/
- WT_WITH_SCHEMA_LOCK(session, ret,
- ret = __backup_start(session, cb, cfg));
+ WT_WITH_CHECKPOINT_LOCK(session, ret,
+ WT_WITH_SCHEMA_LOCK(session, ret,
+ ret = __backup_start(session, cb, cfg)));
WT_ERR(ret);
/* __wt_cursor_init is last so we don't have to clean up on error. */