-
Notifications
You must be signed in to change notification settings - Fork 224
enforce id-based ordering before attempting to obtain partition locks. #265
Conversation
pykafka/simpleconsumer.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you may want to recompute this within your retry loop since owned_partition_offsets is mutated by the loop.
881265a
to
5a1b071
Compare
@yungchin This could use a sanity check. |
@emmett9001 is the sorting in |
No, I don't think it's strictly necessary. I figured sorting is a good idea in general because it makes the whole system more predictable. |
Ok, yeah that seems fine to me - I don't imagine the sorting is very expensive. I've not been able to reproduce the bug here, so can't confirm that it's fixed, but I'm convinced that sorting before taking all the locks is a very real improvement either way. |
enforce id-based ordering before attempting to obtain partition locks.
for #253