Commit 2dbdc90e authored by Grégory Wisniewski's avatar Grégory Wisniewski

Fix "Fix replication when last TID range is empty"

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2499 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 3024298e
......@@ -198,6 +198,9 @@ class ReplicationHandler(EventHandler):
def _checkRange(self, match, current_boundary, next_boundary, length,
count):
if count == 0:
# Reference storage has no data for this chunk, stop and truncate.
return CHECK_DONE, (current_boundary, )
if match:
# Same data on both sides
if length < RANGE_LENGTH and length == count:
......@@ -224,12 +227,7 @@ class ReplicationHandler(EventHandler):
params = (next_boundary, )
else:
# We must recheck current chunk.
if count == 0:
# Reference storage has no data for this chunk, stop and
# truncate.
action = CHECK_DONE
params = (current_boundary, )
elif length <= MIN_RANGE_LENGTH:
if length <= MIN_RANGE_LENGTH:
# We are already at minimum chunk length, replicate.
action = CHECK_REPLICATE
params = (recheck_min_boundary, )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment