fix(postgres): lock keys follow D3.7/D4.3; event reader never sees a later id before an earlier one
This commit is contained in:
1 parent
5cbc9f9d6c
commit
8b006b35aa
4 files changed
+14
-4
No files matched your search
@@ -13,7 +13,7 @@ import (
|
||||
const insertEvent = `-- name: InsertEvent :one
|
||||
|
||||
WITH append_lock AS (
|
||||
SELECT pg_advisory_xact_lock(hashtextextended('archie.events.append', 0))
|
||||
SELECT pg_advisory_xact_lock(hashtextextended('archie.events.insert', 0))
|
||||
)
|
||||
INSERT INTO events (at, kind, task_id, repo, issue, workflow, stage, attempt, actor_id, actor_kind, principal_id, detail, data)
|
||||
SELECT $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13
|
||||
|
||||
Reference in new issue
Block a user