summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/txn/txn_ckpt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/txn/txn_ckpt.c')
-rw-r--r--src/third_party/wiredtiger/src/txn/txn_ckpt.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/third_party/wiredtiger/src/txn/txn_ckpt.c b/src/third_party/wiredtiger/src/txn/txn_ckpt.c
index 9d5f0c1adc0..7d2bb62cdd1 100644
--- a/src/third_party/wiredtiger/src/txn/txn_ckpt.c
+++ b/src/third_party/wiredtiger/src/txn/txn_ckpt.c
@@ -289,7 +289,6 @@ __wt_checkpoint_get_handles(WT_SESSION_IMPL *session, const char *cfg[])
if (F_ISSET(btree, WT_BTREE_NO_CHECKPOINT))
return (0);
-#ifdef HAVE_DIAGNOSTIC
/*
* We may have raced between starting the checkpoint transaction and
* some operation completing on the handle that updated the metadata
@@ -301,32 +300,26 @@ __wt_checkpoint_get_handles(WT_SESSION_IMPL *session, const char *cfg[])
*/
if (!WT_IS_METADATA(session->dhandle)) {
WT_CURSOR *meta_cursor;
- bool metadata_race;
WT_ASSERT(session, !F_ISSET(&session->txn, WT_TXN_ERROR));
WT_RET(__wt_metadata_cursor(session, &meta_cursor));
meta_cursor->set_key(meta_cursor, session->dhandle->name);
ret = __wt_curfile_insert_check(meta_cursor);
if (ret == WT_ROLLBACK) {
- metadata_race = true;
/*
- * Disable this check and assertion for now - it is
- * possible that a schema operation with a timestamp in
- * the future is in the metadata, but not part of the
- * the checkpoint now that checkpoints can be created
- * at the stable timestamp.
- * See WT-3559 for context on re-adding this assertion.
+ * If create or drop or any schema operation of a table
+ * is with in an user transaction then checkpoint can
+ * see the dhandle before the commit, which will lead
+ * to the rollback error. We will ignore this dhandle as
+ * part of this checkpoint by returning from here.
*/
-#if 0
- ret = 0;
-#endif
- } else
- metadata_race = false;
+ WT_TRET(__wt_metadata_cursor_release(session,
+ &meta_cursor));
+ return (0);
+ }
WT_TRET(__wt_metadata_cursor_release(session, &meta_cursor));
WT_RET(ret);
- WT_ASSERT(session, !metadata_race);
}
-#endif
/*
* Decide whether the tree needs to be included in the checkpoint and