Fix seek offset deltas

We always store the offset of the next available message, so we shouldn't decrement the offset deltas
when seeking by an extra 1
This commit is contained in:
Omar Ghishan
2014-01-03 15:18:32 -08:00
parent 99b561d95f
commit 81d001bfa2

View File

@@ -280,12 +280,6 @@ class SimpleConsumer(Consumer):
reqs.append(OffsetRequest(self.topic, partition, -2, 1))
elif whence == 2:
reqs.append(OffsetRequest(self.topic, partition, -1, 1))
# The API returns back the next available offset
# For eg: if the current offset is 18, the API will return
# back 19. So, if we have to seek 5 points before, we will
# end up going back to 14, instead of 13. Adjust this
deltas[partition] -= 1
else:
pass