It is only safe to free the updates after a full update which is inserted into history store as a full update in __wt_hs_insert_updates.
If we free everything inserted into history store and we have modifies still on the chain, we may not be able to reconstruct the full values of the modifies on the chain currently. In the future, we will try to reconstruct modifies base on the onpage value (WT-5507). However, even if we can do that, it is still not safe to free the onpage value here as reconciliation may fail and in that case we will lose everything from the onpage value.
Also we have made the decision to not always insert a full update to the history store if it is the newest update in the history store for that key. In that case, we may need to reconstruct the value of a reverse modify base on the full value on page. Again we cannot guarantee we can successfully write the onpage value to disk at this point.
- causes
-
WT-5522 Remove update free logic in hs_insert_updates.
- Closed
- is caused by
-
WT-5439 Free updates inserted into history store after hs transaction commit in eviction
- Closed
- is related to
-
WT-5507 Free the selected update written to disk in the update chain and reconstruct forward modifies based on the onpage value
- Closed