Closed Bug 488172 Opened 15 years ago Closed 15 years ago

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

Categories

(Cloud Services :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: Mardak, Unassigned)

References

Details

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.
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.
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?
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.
Closing wontfix, as this doesn't hurt anything and provides some extra safety just in case.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
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.