HomePhabricator

Remove sub-second precision from timestamps
8ad626f1c901Unpublished

Tags
None
Referenced Files
None
Subscribers
None

Unpublished Commit · Learn More

Publishing Disabled: All publishing is disabled for this repository.

Description

Remove sub-second precision from timestamps

The integer part of the timestamps is large enough (over a billion) that
the microsecond part, after a roundtrip through the database’s double
type, has lost a bit of precision, causing the same batch to compare as
not equal to itself when one object was directly returned by
store_batch() (original timestamp) and one was loaded from the database
(with precision loss in the timestamp). Since I don’t think we actually
need the sub-second precision for anything, let’s just get rid of it and
truncate to the full second.

The database tables continue to use double for now, I’ll clean that up
later. (The integer part comfortably fits into a double-precision
floating point number.)

Details

Provenance
LucasWerkmeisterAuthored on Mar 17 2019, 5:39 PM
Parents
R2494:77f6172d45ed: Implement _DatabaseCommandRecords.__eq__
Branches
Unknown
Tags
Unknown
ChangeId
None