-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[server] Introduced a repair service for stuck shared consumer (#757)
* [server] Introduced a repair service for stuck shared consumer Recently, we noticed that some shared consumers were stuck since they were blocked by producing to some non-existing topics, and many other store versions got affected since the stuck consumer is being shared by many other stores. This PR introduces a way to detect and repair stuck consumer for above situation. In the high level, there will be a thread periodically check whether consumer#poll is being invoked regularly or not, and if not, the thread will scan all the ingestion tasks to see whether they are producing to any non-existing topics or not. And for the store ingestion task, which is talking to some non-existing topic, the repair thread will try to close the stuck KafkaProducer and kill the corresponding ingestion task. This PR also checked the non-existing topics for a configurable duration to tolerate tranisent topic metadata propagaton delay. 5 new server configs: server.stuck.consumer.repair.enabled : default true server.stuck.consumer.repair.second : default 1 min server.stuck.consumer.repair.threshold.second : default 5 mins server.non.existing.topic.ingestion.task.kill.threshold.second: default 15 mins server.non.existing.topic.check.retry.interval.second: default 1 min 3 new server metrics: .StuckConsumerRepair--stuck_consumer_found.OccurrenceRate .StuckConsumerRepair--ingestion_task_repair.OccurrenceRate .StuckConsumerRepair--repair_failure.OccurrenceRate
- Loading branch information
Showing
12 changed files
with
662 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.