-
Notifications
You must be signed in to change notification settings - Fork 130
Open
Description
I think that with concurrent writes to DB there is a small chance that insert into slot table will create invalid data.
Scenario:
function update_slot
from RPC produce 3 updates per slot processed
, confirmed
and rooted
in that order
Now we have concurrent writes to DB:
if we write them in order root
, confirmed
, processed
then we have incorrect data in DB
INSERT INTO slot (slot, parent, status, updated_on) \
VALUES ($1, $2, $3, $4) \
ON CONFLICT (slot) DO UPDATE SET parent=excluded.parent, status=excluded.status, updated_on=excluded.updated_on
Am I correct?
Metadata
Metadata
Assignees
Labels
No labels