Homec4science

Avoid Timeline race condition

Authored by epriestley <epriestley@phabricator.com> on Apr 14 2011, 18:41.

Description

Avoid Timeline race condition

Summary: While I should fix the transactional stuff, that patch is going to be
tricky and transactions have some performance implications. This is a simple
fix which prevents the race.

Instead of having the data point at the event ID, have the event point at a
data ID. Insert the data first, then insert the event with the right data
pointer. This is super simple and prevents the race issue.

Test Plan:

  • Ran the schema upgrade script, verified that the database was correctly upgraded. Was also prompted to stop daemons.
  • Ran 'repository-launch-master', verified that the discovery daemons were able to discover new commits and insert events for them. Verified the committask daemon was consuming events and converting them into tasks.
  • Verified new tasks looked correct in the database.
  • Browsed web interface.

Reviewers: jungejason

CC: tuomaspelkonen

Differential Revision: 133

Details

Committed
epriestley <epriestley@phabricator.com>Apr 14 2011, 19:12
Pushed
aubortJan 31 2017, 17:16
Parents
rPHf7fe75f756dc: Image macros for Phabricator!
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <epriestley@phabricator.com> committed rPHee1e2da8fbf4: Avoid Timeline race condition (authored by epriestley <epriestley@phabricator.com>).Apr 14 2011, 19:12