-
Type:
Improvement
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Metadata
-
None
-
Storage Engines, Storage Engines - Persistence
-
376.83
-
SE Persistence backlog
-
None
As part of WT-17617, I noticed that WT_SESSION->create takes a long time. A big part of the reason is that on leader at least (and probably follower), creating a new metadata entry requires a checkpoint of the metadata (WiredTiger.wt) file. Since create holds the schema lock, and other things, like reopening a dormant or closed dhandle require the schema lock, this creates a logjam. But this metadata file is a local file, on disagg we don't need to write it, much less sync it. I'm running with a simple change for now:
diff --git a/src/meta/meta_track.c b/src/meta/meta_track.c
index 2068fd5fd7..9567d0e273 100644
--- a/src/meta/meta_track.c
+++ b/src/meta/meta_track.c
@@ -284,7 +284,7 @@ __wt_meta_track_off(WT_SESSION_IMPL *session, bool need_sync, bool unroll)
if (F_ISSET(&S2C(session)->log_mgr, WT_LOG_ENABLED))
WT_WITH_DHANDLE(session, WT_SESSION_META_DHANDLE(session),
ret = __wt_checkpoint_log(session, false, WT_TXN_LOG_CKPT_SYNC, NULL));
- else {
+ else if (!__wt_conn_is_disagg(session)) {
WT_ASSERT(session, FLD_ISSET(session->lock_flags, WT_SESSION_LOCKED_SCHEMA));
ckpt_session = S2C(session)->meta_ckpt_session;
/*
I don't know if this is what the final change should look like (a more complete, but possibly disruptive change would be to not do any writes to WiredTiger.wt on disagg), but this simple change seems to solve the perf problem I'm seeing. We might consider this for a short term fix and file a longer term ticket.