Open iamnoah opened 1 month ago
Are you exiting the poll loop somewhere without allowing rebalance? You may want to check CloseAllowingRebalance()
.
@twmb thanks I will try that. GroupTransactSession doesn't expose that directly, so I'm replacing GroupTransactSession.Close with GroupTransactSession.Client().CloseAllowingRebalance()
?
That will work, but I'll leave this issue open as a reminder to spot check if any APIs are worth mirroring to GroupTransactSession.
From a quick audit, I think only AllowRebalance and CloseAllowingRebalance are worth adding to GroupTransactSession -- for other APIs, a user can go through Client()
We have a GroupTransactSession that we use in a slightly unusual way. We don't actually consume a topic, but instead use offset commit metadata as the cursor for our transactional producer (see #559).
The session is created with these options:
When we hit the MSK auth error described in #731 we are attempting to bail out and restart the process. Sometimes we are getting stuck in LeaveGroupContext:
This keeps the process from exiting, but with our producer unable to produce.
The loop that invokes Close looks like this (simplified):
Other franz-go routines at the time of the above trace:
Dependencies:
What could be causing this? I suspect the
ForceMetadataRefresh
and/or the fact that we don't commit offsets inOnPartitionsRevoked
, but looking through the code, I don't really understand how it hangs where it does, as the consumer group ctx seems like it should already have been canceled.