fix: 改进候选随机性与并发配额稳定性
This commit is contained in:
@@ -9,8 +9,11 @@ WITH expired AS (
|
||||
RETURNING "bottle_id"
|
||||
)
|
||||
UPDATE "bottles" b
|
||||
SET "pool_status" = 'IN_POOL', "version" = b."version" + 1
|
||||
SET "pool_status" = 'IN_POOL',
|
||||
"active_lease_id" = NULL,
|
||||
"version" = b."version" + 1
|
||||
WHERE b."pool_status" = 'LEASED'
|
||||
AND b."active_lease_id" IS NULL
|
||||
AND b."id" IN (SELECT "bottle_id" FROM expired);
|
||||
UPDATE "bottle_pick_leases"
|
||||
SET "lease_token_ciphertext" = decode(repeat('00', 48), 'hex')
|
||||
|
||||
Reference in New Issue
Block a user