summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/schema/schema_alter.c
diff options
context:
space:
mode:
authorAndrew Morton <andrew.morton@mongodb.com>2023-05-16 22:21:25 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-17 00:50:01 +0000
commit376eae9eefe9f752d8d9b5189528f1353c019e54 (patch)
tree8780daf7a9ebd0ed2e8c1b25bf81571b3bb89911 /src/third_party/wiredtiger/src/schema/schema_alter.c
parente94168acd89dba4faef5e43f970633a781e8cba2 (diff)
downloadmongo-376eae9eefe9f752d8d9b5189528f1353c019e54.tar.gz
Import wiredtiger: 04dcc362042b8cc35fdd8de8343be3a15d4fa47c from branch mongodb-master
ref: d310d6330e..04dcc36204 for: 7.1.0-rc0 WT-10898 Add assertions for owning a spinlock
Diffstat (limited to 'src/third_party/wiredtiger/src/schema/schema_alter.c')
-rw-r--r--src/third_party/wiredtiger/src/schema/schema_alter.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/src/schema/schema_alter.c b/src/third_party/wiredtiger/src/schema/schema_alter.c
index 6ebf476db4c..c749b5d456a 100644
--- a/src/third_party/wiredtiger/src/schema/schema_alter.c
+++ b/src/third_party/wiredtiger/src/schema/schema_alter.c
@@ -394,6 +394,9 @@ __schema_alter(WT_SESSION_IMPL *session, const char *uri, const char *newcfg[])
const char *cfg[] = {WT_CONFIG_BASE(session, WT_SESSION_alter), newcfg[0], NULL};
bool exclusive_refreshed;
+ WT_ASSERT_SPINLOCK_OWNED(session, &S2C(session)->checkpoint_lock);
+ WT_ASSERT_SPINLOCK_OWNED(session, &S2C(session)->schema_lock);
+
/*
* Determine what configuration says about exclusive access. A non exclusive alter that doesn't
* refresh in-memory configuration is only valid for the table objects.
@@ -440,6 +443,9 @@ __wt_schema_alter(WT_SESSION_IMPL *session, const char *uri, const char *newcfg[
WT_DECL_RET;
WT_SESSION_IMPL *int_session;
+ WT_ASSERT_SPINLOCK_OWNED(session, &S2C(session)->checkpoint_lock);
+ WT_ASSERT_SPINLOCK_OWNED(session, &S2C(session)->schema_lock);
+
WT_RET(__wt_schema_internal_session(session, &int_session));
WT_ERR(__wt_meta_track_on(int_session));
ret = __schema_alter(int_session, uri, newcfg);