diff options
author | Michael Cahill <michael.cahill@mongodb.com> | 2015-11-03 15:38:29 +1100 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2015-11-03 15:38:29 +1100 |
commit | 1067bc3bbd04c564453033b62008dc603b87b071 (patch) | |
tree | d933d98e25a5de71715f3f102b46a18cdaa69ba0 /src/include/connection.h | |
parent | f4aab28b9bf75c28c1fcb99ffc1879bc0510056f (diff) | |
download | mongo-1067bc3bbd04c564453033b62008dc603b87b071.tar.gz |
WT-2193 Use a separate session for flushing metadata.
In the past, the metadata flush would happen at whatever isolation
level the application session had configured.
If an operation like WT_SESSION::create running at read-uncommitted
caused a metadata flush while a checkpoint was in progress, some of the
checkpoint information could be flushed before the checkpoint was
stable on disk.
Also, if two WT_SESSION::create operations were performed in concurrent
snapshot isolation transactions, whichever flushed the metadata last
would "win", leaving a window (until the next checkpoint) when the
other create was not durable.
By using a separate session configured for read-committed isolation, we make
sure metadata flushes include exactly those changes that are committed before
each flush.
Diffstat (limited to 'src/include/connection.h')
-rw-r--r-- | src/include/connection.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/connection.h b/src/include/connection.h index 03b8174b7e1..a585e08ef1a 100644 --- a/src/include/connection.h +++ b/src/include/connection.h @@ -363,6 +363,8 @@ struct __wt_connection_impl { uint32_t log_prealloc; /* Log file pre-allocation */ uint32_t txn_logsync; /* Log sync configuration */ + WT_SESSION_IMPL *meta_ckpt_session;/* Metadata checkpoint session */ + WT_SESSION_IMPL *sweep_session; /* Handle sweep session */ wt_thread_t sweep_tid; /* Handle sweep thread */ int sweep_tid_set; /* Handle sweep thread set */ |