summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/conn/conn_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/conn/conn_api.c')
-rw-r--r--src/third_party/wiredtiger/src/conn/conn_api.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/third_party/wiredtiger/src/conn/conn_api.c b/src/third_party/wiredtiger/src/conn/conn_api.c
index 9b5e2394b61..f3da1531709 100644
--- a/src/third_party/wiredtiger/src/conn/conn_api.c
+++ b/src/third_party/wiredtiger/src/conn/conn_api.c
@@ -2740,7 +2740,14 @@ wiredtiger_open(const char *home, WT_EVENT_HANDLER *event_handler, const char *c
WT_ERR(wt_session->salvage(wt_session, WT_METAFILE_URI, NULL));
}
- /* Initialize the connection's base write generation. */
+ /*
+ * Initialize the connection's base write generation.
+ *
+ * We'll write over this value after performing rollback to stable however, we need to set it
+ * here. The logic below will involve opening up the metadata file and if the connection-wide
+ * base write generation is uninitialized, we'll tag the btree with the wrong base write gen and
+ * incorrectly interpret transaction ids during rollback to stable.
+ */
WT_ERR(__wt_metadata_init_base_write_gen(session));
WT_ERR(__wt_metadata_cursor(session, NULL));