summaryrefslogtreecommitdiff
path: root/swift/obj/ssync_receiver.py
diff options
context:
space:
mode:
Diffstat (limited to 'swift/obj/ssync_receiver.py')
-rw-r--r--swift/obj/ssync_receiver.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/swift/obj/ssync_receiver.py b/swift/obj/ssync_receiver.py
index b1e2ab072..87fb8b102 100644
--- a/swift/obj/ssync_receiver.py
+++ b/swift/obj/ssync_receiver.py
@@ -45,8 +45,8 @@ def decode_missing(line):
parts = line.decode('ascii').split()
result['object_hash'] = urllib.parse.unquote(parts[0])
t_data = urllib.parse.unquote(parts[1])
- result['ts_data'] = Timestamp(t_data)
- result['ts_meta'] = result['ts_ctype'] = result['ts_data']
+ result['ts_data'] = ts_data = Timestamp(t_data)
+ result['ts_meta'] = result['ts_ctype'] = ts_data
result['durable'] = True # default to True in case this key isn't sent
if len(parts) > 2:
# allow for a comma separated list of k:v pairs to future-proof
@@ -54,9 +54,13 @@ def decode_missing(line):
for item in [subpart for subpart in subparts if ':' in subpart]:
k, v = item.split(':')
if k == 'm':
- result['ts_meta'] = Timestamp(t_data, delta=int(v, 16))
+ # ignore ts_data offset when calculating ts_meta
+ result['ts_meta'] = Timestamp(ts_data.normal,
+ delta=int(v, 16))
elif k == 't':
- result['ts_ctype'] = Timestamp(t_data, delta=int(v, 16))
+ # ignore ts_data offset when calculating ts_ctype
+ result['ts_ctype'] = Timestamp(ts_data.normal,
+ delta=int(v, 16))
elif k == 'durable':
result['durable'] = utils.config_true_value(v)
return result