luke.pearson demonstrated me a case that fails the search if we free the updates on the update chain after inserting updates to history store as WT-5503 currently do:
Suppose we have three full updates on the chain:
F3 -> F2 -> F1
After the first reconciliation:
Disk image has F3, and F2 and F1 are inserted into history store.
Now we update it three more times:
F6 -> F5 -> F4
Then we insert F3, F4, and F5 into history store and reconciliation fail:
We end up with:
F6 and F5 on the update chain, F3 on the disk image, and F5, F4, F3, F2, and F1 in history store.
If we do a search for F4, we get F3. Thus, the conclusion of this is that we can't free anything when inserting things to history store. Thus, the optimisation you think we can do to free updates as early as possible is problematic to achieve vamsi.krishna.