-
Type:
Bug
-
Resolution: Works as Designed
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
None
/* Allocate and initialize the page-deleted structure. */ WT_ERR(__wt_calloc_one(session, &ref->page_del)); ref->page_del->previous_ref_state = previous_state; /* History store truncation is non-transactional. */ if (!WT_IS_HS(session->dhandle)) WT_ERR(__wt_txn_modify_page_delete(session, ref));
Here's the code we currently add a page deleted structure to the page ref. This is wrong as we should fill the content in the page deleted structure first before we publish it to the page ref. Otherwise, the reader may see an unfilled page structure.
We should also use a WT_PUBLISH to set the page_deleted structure back to NULL instead of directly using a free.
__wt_free(session, ref->page_del);
In addition, the declaration of the page_deleted structure pointer should be volatile in the current WiredTiger memory model.