Currently, \ActionScheduler_DBStore::build_insert_sql adds unique actions using a select followed by an insert, which is not an atomic operation. In high-concurrency environments, this gap can result in duplicate unique actions.
We should consider implementing a versioned, nullable unique ID column to prevent duplicates at the atomic level.
Making the column nullable allows (?) us to leave it empty for non-unique actions, what is performance-friendly.
Currently,
\ActionScheduler_DBStore::build_insert_sqladds unique actions using a select followed by an insert, which is not an atomic operation. In high-concurrency environments, this gap can result in duplicate unique actions.We should consider implementing a versioned, nullable unique ID column to prevent duplicates at the atomic level.
Making the column nullable allows (?) us to leave it empty for non-unique actions, what is performance-friendly.