Closed Bug 631233 Opened 14 years ago Closed 14 years ago

Python server returns records with a 'modified' value same as the 'newer' parameter

Categories

(Cloud Services Graveyard :: Server: Sync, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: st3fan, Assigned: tarek)

Details

(Whiteboard: [qa-])

Attachments

(2 files, 2 obsolete files)

The following request: http://sa.tk:5000/1.0/2d6xkt6ofzsb7xqqwxeffkm7wsqygorv/storage/history?full=1&newer=1296746835.09 Returns the following records: DEBUG WBO: {'sortindex': 2000, 'payload': ..., 'modified': Decimal('1296746835.09'), 'id': 'TBpVOawXJ2sN'} DEBUG WBO: {'sortindex': 100, 'payload': ..., 'modified': Decimal('1296746835.09'), 'id': '9_MnuCkjj5kU'} DEBUG WBO: {'sortindex': 100, 'payload': ..., 'modified': Decimal('1296746835.09'), 'id': 'peaB_KC_N4Hi'} (The actual amount is 12 records. I did not show them all) Expected result is only records that are newer than 1296746835.09 The above is the parsed JSON, but I have verified that the timestamps in the original response data are exactly the same.
Might be related to the rounding strategy. (round up/down) Will add a test case and eventually fix it
Assignee: nobody → tarek
Attachment #509594 - Flags: review?(telliott)
Attachment #509594 - Flags: feedback?(sarentz)
Attachment #509594 - Flags: review?(telliott) → review+
So... I found other spots where we're using float to represent time in the app. So the patch needs more work. Working on this today -- Should have a patch sometime this CET afternoon.
We want to catch decimal-specific errror and have a valuerror, which is a more standard/global conversion error.
Attachment #509743 - Flags: review?(telliott)
Completes patch 5095594 - fixed the batch timestamp in the process
Attachment #509775 - Flags: review?(telliott)
Attachment #509743 - Attachment is obsolete: true
Attachment #509776 - Flags: review?(telliott)
Attachment #509743 - Flags: review?(telliott)
Forget about the first patch - <DELETE attachment 5095594> :)
Attachment #509594 - Attachment is obsolete: true
Attachment #509594 - Flags: feedback?(sarentz)
I'm not in the patch feedback list. But, I just appllied these patches and syncing works fine for me. The timestamps in the WBOs look good too. So I think think is all good.
Attachment #509776 - Flags: review?(telliott) → review+
Comment on attachment 509775 [details] [diff] [review] Removed all float representation of time Took me forever to figure out where request.server_time was coming from, but it's fine. I would suggest that round_time take a value representing number of decimal places, only because I expect a function with the profile round_time(time) to give me an integer. That's just a naming thing and not a blocker.
Attachment #509775 - Flags: review?(telliott) → review+
(In reply to comment #9) > Comment on attachment 509775 [details] [diff] [review] > Removed all float representation of time > > Took me forever to figure out where request.server_time was coming from, but > it's fine. > > I would suggest that round_time take a value representing number of decimal > places, only because I expect a function with the profile round_time(time) to > give me an integer. That's just a naming thing and not a blocker. Sure, I can add a precision option.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
Product: Cloud Services → Cloud Services Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: