-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError on task_done #364
Comments
This looks to me like a str / bytes issue using python 3. Going to try to write a test and then fix -- thanks for the bug report! |
well, hmm. I can't reproduce this. looking deeper, existing tests should have caught basic str / bytes issues: https://github.com/mumrah/kafka-python/blob/master/test/test_consumer_integration.py#L476-L517 Could it be the partition that is out of sync? Can you get the value of |
I'm explicitly setting the partitions. I'll see about getting _offsets when But a topic shouldn't be out of sync unless a leader has changed, no? On Saturday, April 4, 2015, Dana Powers notifications@github.com wrote:
|
or possibly that partitions were added or removed, but you would have to do that explicitly via server commands. any additional context you can provide would be helpful - server version, kafka-python version (I am assuming 0.9.3), and the KafkaConsumer config you are using. |
Hey, sorry for the long wait. We're running kafka server version 0.8.2.1. Kafka python is version 0.9.3 The consumer's config is pretty trivial I think:
Here is the contents of
Here's the traceback
Let me know if you need more info |
I just changed |
thanks for all the info -- are you using |
I'm passing this to
EDIT: Tabbed and published comment too early |
This one is very strange. You have a consistent topic-partition list of:
but the task_done error happens when processing a message for topic-partition somehow your consumer is getting messages for a topic-partition that it wasn't configured for. I dont have any good ideas for how that could happen from the kafka-consumer side. Nonetheless, I can add a check in task_done to skip the message if the topic-partition is unrecognized. That should fix the crash, but really we need to figure out how this is happening. Is it possible for the kafka server to return messages for a topic-partition that we did not request specifically? Could this have something to do with segment files on the server side that are corrupted or out of sync? |
Oh wow, just found this lying in my inbox. So sorry to not have answered. We ended up just skipping and warning on To add to your speculation, I don't believe any segments have been corrupted or out of sync, no |
We've dropped |
Hey there.
I keep running into a
KeyError
when usingtask_done
orcommit
on a messageHere's a stacktrace:
Any idea on what I can do to mitigate/fix this?
Let me know if you need more info
The text was updated successfully, but these errors were encountered: