Our history store cursor insert implementation performs a few calls after the actual insertion into the history store stable. If these fail, the insert will return non-zero.
This means that we may bail out of reconciliation without marking the inserted update with the WT_UPDATE_HS flag, leading us to try inserting it again in a subsequent reconciliation.
The relevant lines are here:
https://github.com/wiredtiger/wiredtiger/blob/develop/src/history/hs_rec.c#L638
https://github.com/wiredtiger/wiredtiger/blob/develop/src/cursor/cur_hs.c#L890