You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "georgew5656 (via GitHub)" <gi...@apache.org> on 2024/10/15 14:24:14 UTC

[PR] Load getTaskLocation on task startup in mmless ingestion (druid)

georgew5656 opened a new pull request, #17350:
URL: https://github.com/apache/druid/pull/17350

   Fixes a bug with mmless ingestion when overlord leadership is rolled over.
   
   ### Description
   When a overlord newly attains leadership in a cluster running mmless ingestion, it will load all the running tasks from kubernetes, but not the value of taskLocation. taskLocation is populated the first time getTaskLocation() is called on each task.
   
   The problem with this is getTaskLocation is called in the serviceLocator.locate() method, which runs under the ServiceClientFactory thread pool and is not supposed to make a lot of network calls. Frequently the first caller (before taskLocation is cached) is a supervisor trying to contact its tasks. If there are many supervisors and kafka tasks running in the cluster, the ServiceClientFactory threads can get stuck trying to call locate() (since the function will block on reaching out to k8s for the pod ips).
   
   #### Fixed the bug ...
   #### Renamed the class ...
   #### Added a forbidden-apis entry ...
   Since we don't actually need to update taskLocation (the pod IP is static through the lifetime of a k8s pod and we don't retry jobs), we can just load taskLocation right after the pod has started (in the join method).
   
   #### Release note
   - fix bug with mmless ingestion in high scale clusters
   
   ##### Key changed/added classes in this PR
    * `KubernetesPeonLifecycle`
   
   
   This PR has:
   
   - [X] been self-reviewed.
      - [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] a release note entry in the PR description.
   - [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
   - [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
   - [X] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
   - [ ] added integration tests.
   - [X] been tested in a test Druid cluster.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Load getTaskLocation on task startup in mmless ingestion (druid)

Posted by "georgew5656 (via GitHub)" <gi...@apache.org>.
georgew5656 merged PR #17350:
URL: https://github.com/apache/druid/pull/17350


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org