I’m seeing an interesting issue that someone might...
# troubleshooting
r
I’m seeing an interesting issue that someone might have some insight on. I have a Flink job that has been running for an extended period of time (>8 days). I noticed the consumer lag seemed to climb on two of the three Kafka partitions for that topic. The job only uses Kafka as sinks and sources (no other types are used). Looking at the job, there’s no changes with regards to volume. The job doesn’t show any busy indicators or backpressure for any of the operators either. As far as I can tell - it looks like the job is writing and processing the messages across all of the partitions but only committing to Kafka those present on two of the three partitions for a given topic. Initially I thought it was related to FLIP-28060 (Kafka Broker restarts causing offsets to not be committed) however I see no evidence of a broker restart (and have restarted the job which historically would resolve the issue). I’ve also restarted the job with no state, and the problem still persisted which was more surprising as I’d have expected the consumer to start from the last committed offsets. I did notice the following log that appeared in the job related to committing transactions. It appears to be the only error I’ve seen potentially related to the issue as it involves Kafka:
Copy code
Unable to commit transaction (org.apache.flink.streaming.runtime.operators.sink.committables.CommitRequestImpl@376225a8) because it's in an invalid state. Most likely the transaction has been aborted for some reason. Please check the Kafka logs for more details. org.apache.kafka.common.errors.InvalidTxnStateException: The producer attempted a transactional operation in an invalid state.
No idea if this failure could potentially cause offsets to not be committed in a fashion similar to the previous issue. Any suggestions or ideas are welcome. I’m not sure if there are any metrics or other things to look for in the logs. I’ll be happy to provide any additional details as needed.
d
Hi @Rion Williams. I have exactly the same issue. Do you have any insights?
r
No idea unfortunately. It just started occurring. I’ve reset the job multiple times, used Debug logging for Kafka and the job itself. Still trying to determine a root cause. It seems like it’s related to another job upstream failing to commit transactions, but no smoking gun yet unfortunately
d
Same. Also, I didn't find any log on the Kafka Broker related to the aborted transaction.
@Rion Williams I can reproduce the problem by initiating a non-graceful shutdown, such as deleting the Kubernetes pod of the TaskManager.