syncstorage-rs
syncstorage-rs copied to clipboard
Enforce stricter offset parsing
A followup to #368: Python syncstorage has stricter handling of offset values, raising an InvalidOffsetError when:
- a special "offset token" (
timestamp_bound:offset
format) is specified forsort=index
- a regular offset (just a plain numeric
offset
value) for other sort types
The change to db-tests' get_bsos_limit_offset
in #368 somewhat came across case #1: the fact that passing a timestamp bound to sort=index
is bogus.
Allowing case #2 made sense for the sake of deploying #368 (so a client w/ a plain offset retrieved from just before its deployment would continue working after the deployment). Now that it's deployed we could begin rejecting it also.
@fzzzy did most of this in #494 but we're postponing it for now until we decide how to handle Spanner's usage of the encoded offset (or lack thereof)
Dependent on #645