Homec4science

Prevent worker queue leases from exceeding 64 characters

Authored by epriestley <git@epriestley.com> on Dec 17 2014, 20:10.

Description

Prevent worker queue leases from exceeding 64 characters

Summary:
Ref T6742. Root cause of the issue:

  • Daemon was running on a machine with a very long host name, which produced a lease name which was longer than 64 characters.
  • MySQL wasn't set in STRICT_ALL_TABLES.
  • The daemon would UPDATE .. SET leaseOwner = <very long string> to lock a task, and MySQL would silently truncate.
  • The daemon would then try to select the locked task, but fail, because there's no matching lease owner.

To resolve this, use only the first 32 characters of the hostname. See IRC for more discussion.

Test Plan: Will confirm with reporter.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6742

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

Details

Committed
epriestley <git@epriestley.com>Dec 17 2014, 20:10
Pushed
aubortJan 31 2017, 17:16
Parents
rPHf24ae96bb6e0: Pholio - fix show older transactions for if there are inline comments
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH7d9bda59a6bf: Prevent worker queue leases from exceeding 64 characters (authored by epriestley <git@epriestley.com>).Dec 17 2014, 20:10