Skip to content

Conversation

@sibiryakov
Copy link
Contributor

Without that patch exception wasn't raised, instead consumer keeps retrying fetching.

Copy link
Owner

@dpkp dpkp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the bugfix! I have a few comments about the new log statements. If you don't have time to get back to this, I can fix post-merge.

self._offset_out_of_range_partitions[tp] = fetch_offset
log.info("Fetch offset %s is out of range, resetting offset",
fetch_offset)
log.info("Raising exception")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are edge cases where we dont actually raise an exception -- if the partition gets marked unfetchable, or if a seek invalidates the fetch position.

self._client.cluster.request_update()
elif error_type is Errors.OffsetOutOfRangeError:
fetch_offset = fetch_offsets[tp]
log.info("Fetch offset %s is out of range", fetch_offset)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This log statement should probably include the topic partition

log.info("Fetch offset %s is out of range", fetch_offset)
if self._subscriptions.has_default_offset_reset_policy():
self._subscriptions.need_offset_reset(tp)
log.info("Resetting offset")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Log statement should include the topic-partition

@dpkp dpkp merged commit 2e80fbb into dpkp:master Dec 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants