-
Notifications
You must be signed in to change notification settings - Fork 51
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
Drain After Revoke Error #43
Comments
Hi @amacciola, can you please describe what you mean by "stopping a pipeline"? Please try to provide clear steps: are you stopping Kafka? With each command? Or are you stopping the Elixir code? What are the other instructions around the cluster? Thank you. |
@josevalim sorry for not including more details. I am starting the Pipelines under a DynamicSupervisor and then i am stopping the pipeline by sending a terminate signal. And this happens when i am running it locally and also on our k8s cluster where this specific applications have 3 pods running with a Pipeline running on each pod connected to the same ConsumerGroup |
Can you please try this patch? diff --git a/lib/producer.ex b/lib/producer.ex
index 98f3ee4..bcfc5dc 100644
--- a/lib/producer.ex
+++ b/lib/producer.ex
@@ -412,7 +412,12 @@ defmodule BroadwayKafka.Producer do
@impl :brod_group_member
def assignments_revoked(producer_pid) do
- GenStage.call(producer_pid, :drain_after_revoke, :infinity)
+ # If the producer_pid is no longer alive, it means the revoke
+ # is happening due to a shutdown, so ignore it.
+ if Process.alive?(producer_pid) do
+ GenStage.call(producer_pid, :drain_after_revoke, :infinity)
+ end
+
:ok
end
If it works, please send a PR! |
@josevalim will do. Ill test it out shortly. Thanks |
@josevalim tested it out and the errors do not appear anymore. |
#44 |
Reopening because last PR did not completely fix issue and can cause still major bug. Will submit new PR |
#45 |
When stopping and restarting pipelines i periodically am getting these errors.
Along with my pipeline being stuck in a
rebalancing
loop before it recovers after a while. Any insight into why after stopping a pipeline i am seeing these errors ? ThanksThe text was updated successfully, but these errors were encountered: