feat(auth): add a batch path to the refresh-token repository
TokenRepository.BulkUpsert now stores up to a batch of refresh-token events in one transaction and returns one outcome per event, with the semantics of the single-record Upsert (gitlab-org/gitlab#635782 (closed)). Validate exposes the domain check so a bulk caller can refuse one record without failing the call.
Both paths share applyInTx, which opens the transaction around the batch logic !1010 (merged) added. The RPC that calls this arrives in !991 (merged).
The tests run the upsert sequences as batches against both databases, fold two events for one token id in one call, and force the two races: a signature landing after the lock rolls the whole batch back, and a second batch that starts while the first holds the locks keeps the first revoked_at.
Part 6 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
- !1030 (merged) feat(auth): add a batch path to the refresh-token repository <- this MR
- !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: !1029 (merged) · Next: !1031 (merged)