Homec4science

Improve robustness of cluster version bookkeeping

Authored by epriestley <git@epriestley.com> on Apr 18 2016, 17:16.

Description

Improve robustness of cluster version bookkeeping

Summary:
Ref T4292. Small fixes:

  • There was a bug with the first write, where we'd write 1 but expect 0. Fix this.
  • Narrow the window where we hold the isWriting lock: we don't need to wait for the client to finish.
  • Release the lock even if something throws.
  • Use a more useful variable name.

Test Plan:

  • Made new writes to a fresh cluster repository.
  • Made sequential writes.
  • Made concurrent writes.
  • Made good writes and bad writes.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4292

Differential Revision: https://secure.phabricator.com/D15747

Details

Committed
epriestley <git@epriestley.com>Apr 18 2016, 20:54
Pushed
aubortJan 31 2017, 17:16
Parents
rPH595f20381691: Correct RepositoryURI schema and propagate `adjust` exit code correctly
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH368d2d1ddb11: Improve robustness of cluster version bookkeeping (authored by epriestley <git@epriestley.com>).Apr 18 2016, 20:54