Page MenuHomePhabricator

Correct schema irregularities (including weird keys) with worker task tables
ClosedPublic

Authored by epriestley on Feb 15 2019, 12:54 PM.
Tags
None
Referenced Files
F13063005: D20175.id.diff
Sat, Apr 20, 4:17 AM
Unknown Object (File)
Fri, Apr 19, 3:01 AM
Unknown Object (File)
Fri, Apr 19, 3:01 AM
Unknown Object (File)
Fri, Apr 19, 3:01 AM
Unknown Object (File)
Thu, Apr 18, 11:16 PM
Unknown Object (File)
Wed, Apr 17, 3:11 PM
Unknown Object (File)
Thu, Apr 11, 7:20 AM
Unknown Object (File)
Thu, Apr 11, 4:12 AM
Subscribers
Restricted Owners Package

Details

Summary

Ref T13253. Fixes T6615. See that task for discussion.

  • Remove three keys which serve no real purpose: dataID doesn't do anything for us, and the two leaseOwner keys are unused.
  • Rename leaseOwner_2 to key_owner.
  • Fix an issue where dataID was nullable in the active table and non-nullable in the archive table.

In practice, all workers have data, so all workers have a dataID: if they didn't, we'd already fatal when trying to move tasks to the archive table. Just clean this up for consistency, and remove the ancient codepath which imagined tasks with no data.

Test Plan
  • Ran bin/storage upgrade, inspected tables.
  • Ran bin/phd debug taskmaster, worked through a bunch of tasks with no problems.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable