summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_compact.c12
2 files changed, 12 insertions, 2 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 6066f9a8750..aa8d15df25d 100644
--- a/src/third_party/wiredtiger/import.data
+++ b/src/third_party/wiredtiger/import.data
@@ -2,5 +2,5 @@
"vendor": "wiredtiger",
"github": "wiredtiger/wiredtiger.git",
"branch": "mongodb-master",
- "commit": "a09474e505bafb0c86226c46a2d410263c67fc99"
+ "commit": "a378ba8dbf31a0eece393d3e0f8c048f104600bc"
}
diff --git a/src/third_party/wiredtiger/src/btree/bt_compact.c b/src/third_party/wiredtiger/src/btree/bt_compact.c
index 86f25af4e19..0b7072a168e 100644
--- a/src/third_party/wiredtiger/src/btree/bt_compact.c
+++ b/src/third_party/wiredtiger/src/btree/bt_compact.c
@@ -222,6 +222,8 @@ __compact_walk_internal(WT_SESSION_IMPL *session, WT_REF *parent)
WT_REF *ref;
bool overall_progress, skipp;
+ WT_ASSERT(session, F_ISSET(parent, WT_REF_FLAG_INTERNAL));
+
ref = NULL; /* [-Wconditional-uninitialized] */
/*
@@ -361,7 +363,15 @@ __wt_compact(WT_SESSION_IMPL *session)
if (ref == NULL)
break;
- WT_WITH_PAGE_INDEX(session, ret = __compact_walk_internal(session, ref));
+ /*
+ * The compact walk only flags internal pages for review, but there is a rare case where an
+ * WT_REF in the WT_REF_DISK state pointing to an internal page, can transition to a leaf
+ * page when it is being read in. Handle that here, by re-checking the page type now that
+ * the page is in memory.
+ */
+ if (F_ISSET(ref, WT_REF_FLAG_INTERNAL))
+ WT_WITH_PAGE_INDEX(session, ret = __compact_walk_internal(session, ref));
+
WT_ERR(ret);
}