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

Allow different timechunk lock types to coexist in a task group #16369

Merged

Conversation

AmatyaAvadhanula
Copy link
Contributor

All the streaming ingestion tasks for a given datasource share the same lock for a given interval. Changing lock types in the supervisor can lead to segment allocation errors due to lock conflicts for the new tasks when the older tasks are still running.

This PR allows granting of locks with different types (EXCLUSIVE, SHARED, APPEND, REPLACE) for the same interval within a task group to ensure a transition to newer set of task without failure.

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.

@AmatyaAvadhanula AmatyaAvadhanula added this to the 30.0.0 milestone May 2, 2024
Copy link
Contributor

@kfaraz kfaraz left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix and tests, @AmatyaAvadhanula !

Co-authored-by: Kashif Faraz <[email protected]>
@AmatyaAvadhanula
Copy link
Contributor Author

Thanks for the review, @kfaraz!

@kfaraz kfaraz merged commit b7ae782 into apache:master May 2, 2024
87 checks passed
@kfaraz kfaraz deleted the timechunk-lock-type-conflict-resolution branch May 2, 2024 14:24
AmatyaAvadhanula added a commit to AmatyaAvadhanula/druid that referenced this pull request May 2, 2024
…he#16369)

Description:
All the streaming ingestion tasks for a given datasource share the same lock for a given interval.
Changing lock types in the supervisor can lead to segment allocation errors due to lock conflicts
for the new tasks while the older tasks are still running.

Fix:
Allow locks of different types (EXCLUSIVE, SHARED, APPEND, REPLACE) to co-exist if they have
the same interval and the same task group.
kfaraz pushed a commit that referenced this pull request May 2, 2024
…) (#16373)

Description:
All the streaming ingestion tasks for a given datasource share the same lock for a given interval.
Changing lock types in the supervisor can lead to segment allocation errors due to lock conflicts
for the new tasks while the older tasks are still running.

Fix:
Allow locks of different types (EXCLUSIVE, SHARED, APPEND, REPLACE) to co-exist if they have
the same interval and the same task group.
IgorBerman pushed a commit to IgorBerman/druid that referenced this pull request May 5, 2024
…he#16369)

Description:
All the streaming ingestion tasks for a given datasource share the same lock for a given interval.
Changing lock types in the supervisor can lead to segment allocation errors due to lock conflicts
for the new tasks while the older tasks are still running.

Fix:
Allow locks of different types (EXCLUSIVE, SHARED, APPEND, REPLACE) to co-exist if they have
the same interval and the same task group.
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