Skip to content

Add new context parameter for using concurrent locks#15684

Merged
kfaraz merged 2 commits into
apache:masterfrom
AmatyaAvadhanula:use_concurrent_locks
Jan 16, 2024
Merged

Add new context parameter for using concurrent locks#15684
kfaraz merged 2 commits into
apache:masterfrom
AmatyaAvadhanula:use_concurrent_locks

Conversation

@AmatyaAvadhanula

Copy link
Copy Markdown
Contributor

This PR introduces a new task context flag useConcurrentLocks.
This can be set for an individual task or at a cluster level using druid.indexer.task.default.context.

When set to true any appending task would use an APPEND lock and any other ingestion task would use a REPLACE lock when using time chunk locking.
If not, we fall back on the context flag taskLockType and then useSharedLock.

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.

@github-actions github-actions Bot added Area - Batch Ingestion Area - Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 labels Jan 15, 2024

@kfaraz kfaraz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes look good, left a minor comment.

Also, there seem to be some coverage issues. Maybe add a couple more tests for the new context parameter.

@kfaraz kfaraz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@kfaraz

kfaraz commented Jan 16, 2024

Copy link
Copy Markdown
Contributor

Merging as failure is unrelated.

@kfaraz
kfaraz merged commit 6b951b9 into apache:master Jan 16, 2024
@kfaraz
kfaraz deleted the use_concurrent_locks branch January 16, 2024 07:13
@kfaraz kfaraz added this to the Druid 29.0.0 milestone Jan 17, 2024
AmatyaAvadhanula added a commit to AmatyaAvadhanula/druid that referenced this pull request Jan 29, 2024
Changes:
- Add new task context flag useConcurrentLocks.
- This can be set for an individual task or at a cluster level using `druid.indexer.task.default.context`.
- When set to true, any appending task would use an APPEND lock and any other
ingestion task would use a REPLACE lock when using time chunk locking.
- If false (default), we fall back on the context flag taskLockType and then useSharedLock.
LakshSingla pushed a commit that referenced this pull request Jan 30, 2024
Changes:
- Add new task context flag useConcurrentLocks.
- This can be set for an individual task or at a cluster level using `druid.indexer.task.default.context`.
- When set to true, any appending task would use an APPEND lock and any other
ingestion task would use a REPLACE lock when using time chunk locking.
- If false (default), we fall back on the context flag taskLockType and then useSharedLock.
@gianm gianm mentioned this pull request Feb 12, 2026
9 tasks
riovic918data pushed a commit to riovic918data/druid that referenced this pull request Jun 12, 2026
Changes:
- Add new task context flag useConcurrentLocks.
- This can be set for an individual task or at a cluster level using `druid.indexer.task.default.context`.
- When set to true, any appending task would use an APPEND lock and any other
ingestion task would use a REPLACE lock when using time chunk locking.
- If false (default), we fall back on the context flag taskLockType and then useSharedLock.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area - Batch Ingestion Area - Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants