- update_t *last = update;
- update_t *next = update->next;
- uint64_t min_active = 0;
- if (IS_TAGGED(next, TAG2)) {
- next = (update_t *)STRIP_TAG(next, TAG2);
- min_active = (uint64_t)sl_min_key(active_);
- if (next->version < min_active) {
-
- // Skip over aborted versions to verify the chain of updates is old enough for collection
- update_t *temp = next;
+ uint64_t min_active_version = UNDETERMINED_VERSION;
+ update_t *next_update = NULL;
+ if (IS_TAGGED(update->next, TAG2)) {
+ next_update = (update_t *)(size_t)STRIP_TAG(update->next, TAG2);
+ min_active_version = (uint64_t)sl_min_key(active_);
+ if (next_update->version < min_active_version) {
+ // <next_update> (and all update records following it [execpt if it is aborted]) is old enough that it is
+ // not visible to any active transaction. We can safely free it.
+
+ // Skip over aborted versions to look for more recent updates
+ update_t *temp = next_update;