HomePhabricator

Use "null", not "-1", as a local "no version" marker when performing…

Description

Use "null", not "-1", as a local "no version" marker when performing intracluster repository sync

Summary:
Ref T13242. See https://discourse.phabricator-community.org/t/out-of-range-value-for-column-deviceversion/2218.

The synchronization log column is uint32? and -1 doesn't go into that column.

Since we're only using -1 for convenience to cheat through $max_version > $this_version checks, use null instead and make the checks more explicit.

Test Plan: Reproducing this is a bit tricky and I cheated fairly heavily to force the code down this pathway without actually building a multi-device cluster, but I did reproduce the original exception, apply the patch, and observe that it fixed things.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13242

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

Details

Provenance
epriestleyAuthored on Jan 28 2019, 7:29 PM
epriestleyPushed on Jan 29 2019, 2:50 AM
Reviewer
amckinley
Differential Revision
D20047: Use "null", not "-1", as a local "no version" marker when performing intracluster repository sync
Parents
rP9fd8343704ee: Bring Duo MFA upstream
Branches
Unknown
Tags
Unknown
Tasks
T13242: 2019 Week 5 Bonus Content
Build Status
Buildable 21739
Build 29661: Run Core Tests