HomePhabricator

Improve robustness of cluster version bookkeeping

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

Provenance
epriestleyAuthored on Apr 18 2016, 3:16 PM
epriestleyPushed on Apr 18 2016, 6:55 PM
Reviewer
chad
Differential Revision
D15747: Improve robustness of cluster version bookkeeping
Parents
rP595f20381691: Correct RepositoryURI schema and propagate `adjust` exit code correctly
Branches
Unknown
Tags
Unknown
Tasks
T4292: Implement repository replication
Build Status
Buildable 11822
Build 14831: Run Core Tests