Get rid of string parsing of modified, which is already a number

RESOLVED WONTFIX

Status

Cloud Services
General
RESOLVED WONTFIX
9 years ago
9 years ago

People

(Reporter: Mardak, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 years ago
Seems like old code from old modified time format according to the wiki example:
"modified": "2454725.98283",

Now modified seems to be a plain int number -- no decimal points.. not 2 or 4.

Comment 1

9 years ago
we've had a lot of problems in the past with this, I recommend you do not remove the string parsing code at this time.

failure cases are bad - the engine just fails to sync.
(Reporter)

Comment 2

9 years ago
This would still happen after a server wipe? Does the server just overwrite the modified field anyway even if the client sets it to something else?

Comment 3

9 years ago
The client never sets the modified field, ever. It is a server-provided almost-opaque token (opaque except for the fact that two tokens can be compared via > )

The server has gone back and forth between using numbers and strings, mostly because we didn't want the server to require bignum php libraries, and php otherwise supports only 32-bit numbers (as opposed to 56-bit in js).

The check to make sure it's a number doesn't hurt anything, so I don't see a good reason to take it out.

Comment 4

9 years ago
Closing wontfix, as this doesn't hurt anything and provides some extra safety just in case.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → WONTFIX

Updated

9 years ago
Component: Weave → General
Product: Mozilla Labs → Weave
Target Milestone: -- → ---
Version: Trunk → unspecified
QA Contact: weave → general
You need to log in before you can comment on or make changes to this bug.