diff --git a/src/third_party/wiredtiger/build_linux/wiredtiger_config.h b/src/third_party/wiredtiger/build_linux/wiredtiger_config.h index fca49bf..05a4854 100644 --- a/src/third_party/wiredtiger/build_linux/wiredtiger_config.h +++ b/src/third_party/wiredtiger/build_linux/wiredtiger_config.h @@ -21,6 +21,7 @@ /* Define to 1 for diagnostic tests. */ /* #undef HAVE_DIAGNOSTIC */ +#define HAVE_DIAGNOSTIC 1 /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 diff --git a/src/third_party/wiredtiger/src/schema/schema_create.c b/src/third_party/wiredtiger/src/schema/schema_create.c index 641c997..abd317c 100644 --- a/src/third_party/wiredtiger/src/schema/schema_create.c +++ b/src/third_party/wiredtiger/src/schema/schema_create.c @@ -689,21 +689,27 @@ __wt_schema_create( */ WT_RET(__wt_meta_track_on(session)); - if (WT_PREFIX_MATCH(uri, "colgroup:")) + if (WT_PREFIX_MATCH(uri, "colgroup:")) { + __wt_yield(); ret = __create_colgroup(session, uri, exclusive, config); - else if (WT_PREFIX_MATCH(uri, "file:")) + } else if (WT_PREFIX_MATCH(uri, "file:")) { + __wt_yield(); ret = __create_file(session, uri, exclusive, config); - else if (WT_PREFIX_MATCH(uri, "lsm:")) + } else if (WT_PREFIX_MATCH(uri, "lsm:")) { + __wt_yield(); ret = __wt_lsm_tree_create(session, uri, exclusive, config); - else if (WT_PREFIX_MATCH(uri, "index:")) + } else if (WT_PREFIX_MATCH(uri, "index:")) { + __wt_yield(); ret = __create_index(session, uri, exclusive, config); - else if (WT_PREFIX_MATCH(uri, "table:")) + } else if (WT_PREFIX_MATCH(uri, "table:")) { + __wt_yield(); ret = __create_table(session, uri, exclusive, config); - else if ((dsrc = __wt_schema_get_source(session, uri)) != NULL) + } else if ((dsrc = __wt_schema_get_source(session, uri)) != NULL) { + __wt_yield(); ret = dsrc->create == NULL ? __wt_object_unsupported(session, uri) : __create_data_source(session, uri, config, dsrc); - else + } else ret = __wt_bad_object_type(session, uri); session->dhandle = NULL; diff --git a/src/third_party/wiredtiger/src/txn/txn_ckpt.c b/src/third_party/wiredtiger/src/txn/txn_ckpt.c index 9b6070b..debb636 100644 --- a/src/third_party/wiredtiger/src/txn/txn_ckpt.c +++ b/src/third_party/wiredtiger/src/txn/txn_ckpt.c @@ -304,11 +304,21 @@ __wt_checkpoint_get_handles(WT_SESSION_IMPL *session, const char *cfg[]) bool metadata_race; WT_ASSERT(session, !F_ISSET(&session->txn, WT_TXN_ERROR)); + __wt_sleep(0, 1000); 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; + /* + * if create or drop of a table are with in an user transaction + * then checkpoint can see the dhandle before the commit, + * which will lead to this situation. we will ignore this dhandle + * as part of this checkpoint. Also clear the txn error set. + */ + if(F_ISSET(&session->txn, WT_TXN_ERROR)) + F_CLR(&session->txn, WT_TXN_ERROR); + WT_TRET(__wt_metadata_cursor_release(session, &meta_cursor)); + return (0); /* * Disable this check and assertion for now - it is * possible that a schema operation with a timestamp in