Loading
fix(auth): gate stored rows in one upsert helper and wait on the lock
A refresh-token event whose row is already stored is now refused when its client is not replicated, in a unit test that pins the gate for existing rows. The single-event transaction lives in one helper, upsertOne, which Upsert, the unit tests and the race tests all call, so the real return path is under test. The lock-wait poll in the race test requires a lock wait event on Postgres, so another package's delete cannot satisfy it.
These are the three suggestions left open on !1010 (merged), which moved the upsert rules into Go. No runtime behaviour changes.
Part 5 of 11. The full change is in !959 (closed), the integration MR, kept open for the big picture.
- !988 (merged) feat(proto): add BulkUpsertClients and UpsertResult (merged)
- !989 (merged) feat(auth): add BulkUpsertClients with per-record results (merged)
- !990 (merged) refactor(auth): move the bulk record helpers to internal/batch (merged)
- !1010 (merged) fix(auth): decide refresh-token upserts in Go (merged)
- !1029 (merged) fix(auth): gate stored rows in one upsert helper and wait on the lock <- this MR
- !1030 (merged) feat(auth): add a batch path to the refresh-token repository
- !1031 (merged) feat(proto): add BulkUpsert to the refresh-token service
- !991 (merged) feat(auth): add refresh-token BulkUpsert with per-record results
- !992 (merged) feat(auth): add refresh-token BulkDelete
- !993 (merged) feat(auth): add refresh-token GetState
- !994 (merged) feat(auth): count bulk RPC records by outcome
Previous: !1010 (merged) · Next: !1030 (merged)
Edited by Shilpa Kundapur