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

Assisted inject for datanode migration context #19926

Merged
merged 6 commits into from
Jul 18, 2024

Conversation

todvora
Copy link
Contributor

@todvora todvora commented Jul 16, 2024

The existing MigrationActionsImpl was a singleton. We were setting the MigrationStateMachineContext to a singleton from different request threads, losing anything that the other thread could have written to the context before. This occured during parallel /state and /trigger request during migrations.

New implementation is using a factory for the MigrationActions, creating new instance for each request, propagating a new instance of MigrationStateMachineContext for each thread. This separates the actions contexts of several threads, never mixing them.

/nocl

Motivation and Context

Sometimes during the connection check in remote reindex migration, a message "No indexes available" has been displayed. There was no problem with the connection check itself, but due to the threading issue and context overriding, we lost the check info and never returned it.

How Has This Been Tested?

Manually + existing set of unit and integration tests.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@todvora todvora requested a review from moesterheld July 16, 2024 15:17
Copy link
Contributor

@moesterheld moesterheld left a comment

Choose a reason for hiding this comment

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

Very nice solution. just some minor cosmetic changes.

@todvora todvora requested a review from moesterheld July 17, 2024 11:52
@moesterheld moesterheld merged commit 1fc7f56 into master Jul 18, 2024
5 checks passed
@moesterheld moesterheld deleted the fix/migration-actions-context branch July 18, 2024 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants