Skip to content

Transactional replace should only consider supervisors with appending locks#15220

Merged
abhishekagarwal87 merged 1 commit intoapache:masterfrom
AmatyaAvadhanula:supervisor_with_append_lock
Oct 22, 2023
Merged

Transactional replace should only consider supervisors with appending locks#15220
abhishekagarwal87 merged 1 commit intoapache:masterfrom
AmatyaAvadhanula:supervisor_with_append_lock

Conversation

@AmatyaAvadhanula
Copy link
Copy Markdown
Contributor

A SegmentTransactionReplaceAction must only update the mapping of tasks with append locks that are running concurrently. To ensure this, we return the supervisor id only if it has the taskLockType as APPEND in its context.

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 28.0 milestone Oct 20, 2023
}

@Test
public void testGetActiveSupervisorIdForDatasourceWithAppendLock()
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.

there is a lot of fine-grained mocking here that makes the test aware of each and every call being made in the implementation. We should refactor the code so we can avoid such mocking.

@abhishekagarwal87 abhishekagarwal87 merged commit 33fdd77 into apache:master Oct 22, 2023
LakshSingla pushed a commit to LakshSingla/druid that referenced this pull request Oct 23, 2023
…al replace (apache#15220)

A SegmentTransactionReplaceAction must only update the mapping of tasks with append locks that are running concurrently. To ensure this, we return the supervisor id only if it has the taskLockType as APPEND in its context.
LakshSingla added a commit that referenced this pull request Oct 23, 2023
…al replace (#15220) (#15229)

A SegmentTransactionReplaceAction must only update the mapping of tasks with append locks that are running concurrently. To ensure this, we return the supervisor id only if it has the taskLockType as APPEND in its context.

Co-authored-by: AmatyaAvadhanula <amatya.avadhanula@imply.io>
CaseyPan pushed a commit to CaseyPan/druid that referenced this pull request Nov 17, 2023
…al replace (apache#15220)

A SegmentTransactionReplaceAction must only update the mapping of tasks with append locks that are running concurrently. To ensure this, we return the supervisor id only if it has the taskLockType as APPEND in its context.
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