{"action":"opened","issue":{"url":"https://api.github.com/repos/druid-io/druid/issues/4812","repository_url":"https://api.github.com/repos/druid-io/druid","labels_url":"https://api.github.com/repos/druid-io/druid/issues/4812/labels{/name}","comments_url":"https://api.github.com/repos/druid-io/druid/issues/4812/comments","events_url":"https://api.github.com/repos/druid-io/druid/issues/4812/events","html_url":"https://github.com/druid-io/druid/issues/4812","id":258236374,"number":4812,"title":"Better handling of Supervisor spec udpate","user":{"login":"pjain1","id":11787983,"avatar_url":"https://avatars1.githubusercontent.com/u/11787983?v=4","gravatar_id":"","url":"https://api.github.com/users/pjain1","html_url":"https://github.com/pjain1","followers_url":"https://api.github.com/users/pjain1/followers","following_url":"https://api.github.com/users/pjain1/following{/other_user}","gists_url":"https://api.github.com/users/pjain1/gists{/gist_id}","starred_url":"https://api.github.com/users/pjain1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjain1/subscriptions","organizations_url":"https://api.github.com/users/pjain1/orgs","repos_url":"https://api.github.com/users/pjain1/repos","events_url":"https://api.github.com/users/pjain1/events{/privacy}","received_events_url":"https://api.github.com/users/pjain1/received_events","type":"User","site_admin":false},"labels":[{"id":690563043,"url":"https://api.github.com/repos/druid-io/druid/labels/Area%20-%20Kafka%20Indexing","name":"Area - Kafka Indexing","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-16T14:52:40Z","updated_at":"2017-09-16T14:52:40Z","closed_at":null,"author_association":"MEMBER","body":"If a modified supervisor spec is posted to overlord for an already existing and currently running supervisor then the overlord posts a `GracefulShutdownNotice` to the running supervisor and starts the new one with updated spec. When the new Supervisor starts running then ideally it should start new tasks at offsets where the old tasks are supposed to finish (being optimistic). However, currently I have observed that it tires to signal the task to stop without publish and starts new tasks at the same start offset as old ones.\r\nAs far as I can understand it does that because when the new Supervisor runs and runs the `discoverTasks` method, it discovers the old tasks but they might not be `PUBLISHING` state as tasks will take some time to persist pending data and then switch to publishing state, thus the supervisor will match the task spec with current spec and realize that they are not current and thus try to stop. Ideally, the tasks should be in `pendingCompletionTaskGroups` so that supervisor waits for them to finish and also start the new tasks from where the old tasks are finishing."}}
{"actor":{"display_login":"pjain1"}}