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

[FLAKY TEST] Fix codec test causing CI to fail #277

Merged
merged 2 commits into from
Feb 10, 2022

Conversation

jmazanec15
Copy link
Member

Description

CI keeps failing because of our Codec tests: https://github.com/opensearch-project/k-NN/actions/runs/1820922609. It is due to threads leaking. This PR closes a 2 closeables that were causing an issue: IndexLoadStrategy, resourceWatcherService.

CI was able to pass on my fork: https://github.com/jmazanec15/k-NN-1/actions/runs/1821011151.

Check List

  • Commits are signed as per the DCO using --signoff

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.

Closes resource monitor at the end of the tests so that there are no
unparked threads.

Signed-off-by: John Mazanec <[email protected]>
@jmazanec15 jmazanec15 requested a review from a team February 9, 2022 23:59
@@ -109,7 +109,8 @@ public void testFooter(Codec codec) throws Exception {
doc.add(vectorField);
writer.addDocument(doc);

NativeMemoryLoadStrategy.IndexLoadStrategy.initialize(createDisabledResourceWatcherService());
ResourceWatcherService resourceWatcherService = createDisabledResourceWatcherService();
NativeMemoryLoadStrategy.IndexLoadStrategy.initialize(resourceWatcherService);
Copy link
Member

Choose a reason for hiding this comment

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

It seems that the only change in these lines is related to improved code readability, is this correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

I did it to be able to close resourceWatcherService at the end.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see, that makes sense. Thank you Jack

Copy link
Member

@vamshin vamshin left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks

@jmazanec15 jmazanec15 merged commit 18e6e35 into opensearch-project:main Feb 10, 2022
jmazanec15 added a commit to jmazanec15/k-NN-1 that referenced this pull request Feb 10, 2022
Closes resource monitor at the end of the Codec tests so that there are no
unparked threads.

Signed-off-by: John Mazanec <[email protected]>
@jmazanec15 jmazanec15 added backport 1.x backport 1.2 label to add to PRs to auto backport labels Feb 10, 2022
github-actions bot pushed a commit that referenced this pull request Feb 10, 2022
Closes resource monitor at the end of the Codec tests so that there are no
unparked threads.

Signed-off-by: John Mazanec <[email protected]>
(cherry picked from commit 18e6e35)
github-actions bot pushed a commit that referenced this pull request Feb 10, 2022
Closes resource monitor at the end of the Codec tests so that there are no
unparked threads.

Signed-off-by: John Mazanec <[email protected]>
(cherry picked from commit 18e6e35)
jmazanec15 pushed a commit that referenced this pull request Feb 10, 2022
Closes resource monitor at the end of the Codec tests so that there are no
unparked threads.

Signed-off-by: John Mazanec <[email protected]>
(cherry picked from commit 18e6e35)
jmazanec15 pushed a commit that referenced this pull request Feb 10, 2022
Closes resource monitor at the end of the Codec tests so that there are no
unparked threads.

Signed-off-by: John Mazanec <[email protected]>
(cherry picked from commit 18e6e35)
martin-gaievski pushed a commit to martin-gaievski/k-NN that referenced this pull request Mar 7, 2022
… (opensearch-project#286)

Closes resource monitor at the end of the Codec tests so that there are no
unparked threads.

Signed-off-by: John Mazanec <[email protected]>
(cherry picked from commit 18e6e35)
martin-gaievski pushed a commit to martin-gaievski/k-NN that referenced this pull request Mar 7, 2022
… (opensearch-project#286)

Closes resource monitor at the end of the Codec tests so that there are no
unparked threads.

Signed-off-by: John Mazanec <[email protected]>
(cherry picked from commit 18e6e35)
Signed-off-by: Martin Gaievski <[email protected]>
martin-gaievski pushed a commit to martin-gaievski/k-NN that referenced this pull request Mar 30, 2022
Closes resource monitor at the end of the Codec tests so that there are no
unparked threads.

Signed-off-by: John Mazanec <[email protected]>
martin-gaievski pushed a commit to martin-gaievski/k-NN that referenced this pull request Mar 31, 2022
… (opensearch-project#286)

Closes resource monitor at the end of the Codec tests so that there are no
unparked threads.

Signed-off-by: John Mazanec <[email protected]>
(cherry picked from commit 18e6e35)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.x backport 1.2 label to add to PRs to auto backport
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants