Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.

Conversation

@LayneHaber
Copy link
Contributor

The Problem

  • create updates are not idempotent, and there is a race condition
  • The race is between an update initiator completing an update when they don't have priority and an update responder submitting an update at a higher priority (after completing the update from the initiator). If the update initiator is proposing a create update, then it will get re-added into the queue once they receive the message from the responder despite the fact that it syncs from the responder's proposed update.

The Solution

  • Adds update.id, making the create updates idempotent
  • Adds store migrations to make sure the update is retrievable by id
  • Checks on start of queue if an update has already been executed

@LayneHaber LayneHaber requested a review from rhlsthrm June 2, 2021 20:56
@LayneHaber LayneHaber changed the title 556 update 556 update id Jun 2, 2021
@LayneHaber LayneHaber merged commit d3416e5 into 556-no-lock Jun 3, 2021
@LayneHaber LayneHaber deleted the 556-update-id branch June 3, 2021 03:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants