Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

supervisor: make rejection periods work with stopTasksCount #17442

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

adithyachakilam
Copy link
Contributor

@adithyachakilam adithyachakilam commented Nov 3, 2024

Description

In cases where stopTasksCount is configured which makes streaming tasks run much longer (in some cases) than the configured task duration, early/late rejection periods are not correctly implemented since they are configured during the task startup time in IOConfig. Instead, this PR propagates updates the min/max times once every task duration.


Key changed/added classes in this PR
  • SeekableStreamIndexTaskRunner
  • SeekableStreamIndexTaskIOConfig

This PR has:

  • been self-reviewed.
  • 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
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

Copy link
Contributor

@suneet-s suneet-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implementation of refreshing the min / max times every 10 min is a change in behavior, so I think the person submitting the supervisor spec needs to opt in to this new behavior which doesn't appear possible in the current approach.

An alternative approach to consider is to update the IOConfig to include a "refresh interval" field that defaults to infinity that would refresh the min / max times in the IOConfig.

The tasks could then update their min / max times every duration just by adding the refresh interval so we don't need to worry about clock skew across the peons.

Since this patch is meant to just deal with stopTaskCount - have you considered refreshing the min / max times every task duration to mimic the existing behavior if stopTaskCount was not set (aka every task duration the min/max times across all peons are updated)

Comment on lines 53 to 54
@JsonProperty("lateMessageRejectionPeriod") Duration lateMessageRejectionPeriod,
@JsonProperty("earlyMessageRejectionPeriod") Duration earlyMessageRejectionPeriod,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These new fields need to be in addition to the old fields to ensure a newer version of the overlord works with older versions of the indexing tasks. But more importantly, in the case of a rollback - an older overlord needs to work with a newer version of indexing services

@adithyachakilam
Copy link
Contributor Author

@suneet-s Thanks for the review, I've changed the patch to just update the min/max times once every task duration. So this also avoids all those version problems.

@adithyachakilam adithyachakilam changed the title supervisor: propagate rejection periods to tasks supervisor: make rejection periods work with stopTasksCount Nov 5, 2024
Copy link
Contributor

@suneet-s suneet-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not reviewed the tests yet.

For this change, we should also include docs for what this new parameter is in the IOConfig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants