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

Fix NPE on s3 source stopping without sqs, stop s3 scan worker thread… #3178

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

graytaylor0
Copy link
Member

@graytaylor0 graytaylor0 commented Aug 16, 2023

… on stopping of the s3 source

Description

The s3 source was throwing a NPE during the stop method when sqs was not configured.

Additionally, the s3 scan worker thread was not being interrupted when stop was called on the s3

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

… on stopping of the s3 source

Signed-off-by: Taylor Gray <[email protected]>
sqsService.stop();
}

if (Objects.nonNull(s3ScanService) && Objects.nonNull(sourceCoordinator)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should these be stopped independently? Something like

if (Objects.nonNull(s3ScanService)) {
  s3ScanService.stop();
}

if (Objects.nonNull(sourceCoordinator)) {
  sourceCoordinator.giveUpPartitions();
}

@engechas engechas merged commit 6949780 into opensearch-project:main Aug 16, 2023
24 checks passed
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.

3 participants