Homec4science

Fix Feed Times on 32 Bit Servers

Authored by David Fisher <ddf1991@gmail.com> on Feb 29 2012, 06:03.

Description

Fix Feed Times on 32 Bit Servers

Summary:
The feed time is stored as the upper 32 bits of
PhabricatorFeedStoryData::chronologicalKey. These bits were previously accessed
by right shifting, which does not work properly on 32 bit machines (the result
is PHP_INT_MAX). We now attempt to use the bc extension (if available) and fall
back on mysql math otherwise. (See T500, D912).

Test Plan:
The calculation is unchanged for 64 bit machines. I checked both
paths on a 32 bit machine with bc extension available by setting the appropriate
if-condition to false and true.

Reviewers: epriestley

Reviewed By: epriestley

CC: ddfisher, aran, epriestley

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

Details

Committed
epriestley <git@epriestley.com>Feb 29 2012, 06:04
Pushed
aubortJan 31 2017, 17:16
Parents
rPH9b318e4044c8: Respect username letter case in Remarkup
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHe846a1747ef3: Fix Feed Times on 32 Bit Servers (authored by David Fisher <ddf1991@gmail.com>).Feb 29 2012, 06:04