In process_tables_expire(), if the table we're analyzing still has
entries, and thus should be put back into the tree, do not put it in the
mt_list, to have it put back into the tree the next time the task runs.
There is no problem with putting it in the tree right away, as either
the next expiration is in the future, or we handled the maximum number
of expirations per task call and we're about to stop, anyway.
This does not need to be backported.
HA_ATOMIC_CAS(&t->shards[shard].next_exp, &old_exp, next_exp_table);
}
- eb32_delete(table_eb);
- table_eb->key = TICK_ETERNITY;
/*
- * If there's more entry, just put it back into the list,
- * it'll go back into the tree the next time the task runs.
+ * Move the table to its next expiration date, if any.
*/
+ eb32_delete(table_eb);
+ table_eb->key = next_exp_table;
if (next_exp_table != TICK_ETERNITY)
- MT_LIST_TRY_APPEND(&per_bucket[shard].toadd_tables, &t->shards[shard].in_bucket_toadd);
+ eb32_insert(&ps->tables, table_eb);
}
table_eb = tmpnode;
}