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

Cleanup resources properly when Opensearch sink fails to initialize #4758

Merged
merged 3 commits into from
Jul 30, 2024

Conversation

kkondaka
Copy link
Collaborator

Description

Cleans up resources properly when Opensearch sink fails to initialize

Issues Resolved

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • [ X] 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.

@kkondaka kkondaka force-pushed the ossink-retry-fix branch 4 times, most recently from 85507cc to 3a70f10 Compare July 23, 2024 23:34
@kkondaka kkondaka marked this pull request as ready for review July 24, 2024 06:17
@dlvenable
Copy link
Member

@kkondaka , This PR has a lot of commits that are already merged. Can you clean up the branch so that we know what we are reviewing?

@kkondaka
Copy link
Collaborator Author

@dlvenable This is strange. I took care of this issue and it showed only two files as modified last time. Not sure how it got changed again

kkondaka and others added 3 commits July 30, 2024 15:55
Signed-off-by: Krishna Kondaka <[email protected]>
Signed-off-by: Krishna Kondaka <[email protected]>
Signed-off-by: Krishna Kondaka <[email protected]>
@@ -615,6 +615,7 @@ private void closeFiles() {
public void shutdown() {
super.shutdown();
closeFiles();
openSearchClient.shutdown();
Copy link
Member

@dinujoh dinujoh Jul 30, 2024

Choose a reason for hiding this comment

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

What does this shutdown api do ? Does it close the client or shutdown the node ? We don't want the later behavior.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It just shuts down the client to the opensearch. We create it again when we do doInitialize. So, shutting down is the correct thing to do.

@kkondaka kkondaka merged commit e66f9bc into opensearch-project:main Jul 30, 2024
68 checks passed
kkondaka added a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Aug 8, 2024
…pensearch-project#4758)

* dplive1.yaml

Signed-off-by: Krishna Kondaka <[email protected]>

* rebased to latest

Signed-off-by: Krishna Kondaka <[email protected]>

* removed unnecessary file

Signed-off-by: Krishna Kondaka <[email protected]>

---------

Signed-off-by: Krishna Kondaka <[email protected]>
Co-authored-by: Krishna Kondaka <[email protected]>
Signed-off-by: Krishna Kondaka <[email protected]>
kkondaka added a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Aug 12, 2024
…pensearch-project#4758)

* dplive1.yaml

Signed-off-by: Krishna Kondaka <[email protected]>

* rebased to latest

Signed-off-by: Krishna Kondaka <[email protected]>

* removed unnecessary file

Signed-off-by: Krishna Kondaka <[email protected]>

---------

Signed-off-by: Krishna Kondaka <[email protected]>
Co-authored-by: Krishna Kondaka <[email protected]>
Signed-off-by: Krishna Kondaka <[email protected]>
kkondaka added a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Aug 14, 2024
…pensearch-project#4758)

* dplive1.yaml

Signed-off-by: Krishna Kondaka <[email protected]>

* rebased to latest

Signed-off-by: Krishna Kondaka <[email protected]>

* removed unnecessary file

Signed-off-by: Krishna Kondaka <[email protected]>

---------

Signed-off-by: Krishna Kondaka <[email protected]>
Co-authored-by: Krishna Kondaka <[email protected]>
Signed-off-by: Krishna Kondaka <[email protected]>
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