Mint an opaque UUID token, in one insert

FeatureMediaService
Ya
20 Agosti 2026, 14:43 UTC
Mwandishi
Kamo
Ahadi ya
3bd5e82

createCode generates the token itself, so there is nothing to read first and nothing for two tabs to collide over. That removes the whole apparatus the old sequential token needed: the max(iteration) + 1 read, the collision-detecting retry, and the REQUIRES_NEW TransactionTemplate that retry needed because a unique_violation aborts the transaction it happened in on YSQL. One save, done. A UUID collision is not a case worth writing code for; the unique index on CODE stays as the backstop so an impossible one fails loudly rather than quietly attributing two members' traffic to one row.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei