Kiarash Norouzi
07/12/2024, 4:15 PMindex_kafka task running for about 145 hours without completing any handoff. The taskDuration for that supervisor is 30 minutes. Normally, index_kafka tasks for this supervisor will receive a pause command after 30 minutes from the overlord to:
1. Update the end offset
2. Save sequence metadata to disk
Afterward, a resume command is sent to the task to:
1. Finish reading from partitions
2. Publish segments
Finally, a graceful shutdown begins.
However, this malfunctioning task did not receive a pause command for many hours. My question is, in what scenarios would this situation occur?Tim Wolfe
08/30/2024, 2:55 PMtaskDuration. This scenario could lead to the task still processing data when the next pause command is supposed to be issued.
2. Resource Constraints: Insufficient worker capacity configured in the middlemanager may result in tasks queuing rather than being processed. This can delay the execution of the pause command and impact the overall task performance. This scenario can happen if there are competing tasks consuming the available resources.
3. Task Failure or Hanging: If the task encounters an unexpected condition (such as a connection issue with the Kafka stream or an internal error), it may hang or become unresponsive, preventing it from properly handling the commands from the overlord.
4. Supervisor Configuration Issues: Misconfigurations within the supervisor specification, such as settings that prevent the correct execution order of commands (pause, update offsets, resume), may also lead to such scenarios. For instance, if the druid.indexer.tasklock.forcetimechunklock property is leading to locking issues, the task might not receive the expected commands on time.
5. Delayed Metadata Updates: The metadata store, which tracks the state of tasks, may not update promptly, resulting in the overlord not knowing that the task needs a pause command. If the metadata store is slow to reflect the current task state, the overlord might fail to send out the necessary commands.
Each of these scenarios could contribute to the observed behavior of the index_kafka task running longer than intended without receiving the appropriate pause command.
Sources:
- Supervisor Management: supervisor.md (internal document)
- Indexing Tasks: storage.md (internal document)
- Task Locking Behavior: tasks.md (internal document)Kiarash Norouzi
08/30/2024, 3:12 PM