diff options
author | Omar Ghishan <omar.ghishan@rd.io> | 2014-01-03 15:18:32 -0800 |
---|---|---|
committer | Omar Ghishan <omar.ghishan@rd.io> | 2014-01-06 15:14:50 -0800 |
commit | 81d001bfa2b6936dbefd8515204c2d51a7f299f8 (patch) | |
tree | c30eb4c3a0ee69c7b584a3dcbe0909a701ced971 /kafka/consumer.py | |
parent | 99b561d95f558652583f79aa4ac5dfa4c5e1b854 (diff) | |
download | kafka-python-81d001bfa2b6936dbefd8515204c2d51a7f299f8.tar.gz |
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
Diffstat (limited to 'kafka/consumer.py')
-rw-r--r-- | kafka/consumer.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/kafka/consumer.py b/kafka/consumer.py index ff08da4..8cf2760 100644 --- a/kafka/consumer.py +++ b/kafka/consumer.py @@ -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 |