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

Safely Close Repositories on Node Shutdown (#48020) #48107

Merged
merged 3 commits into from
Oct 17, 2019

Conversation

original-brownbear
Copy link
Member

We were not closing repositories on Node shutdown.
In production, this has little effect but in tests
shutting down a node using MockRepository and is
currently stuck in a simulated blocked-IO situation
will only unblock when the node's threadpool is
interrupted. This might in some edge cases (many
snapshot threads and some CI slowness) result
in the execution taking longer than 5s to release
all the shard stores and thus we fail the assertion
about unreleased shard stores in the internal test cluster.

Regardless of tests, I think we should close repositories
and release resources associated with them when closing
a node and not just when removing a repository from the CS
with running nodes as this behavior is really unexpected.

Fixes #47689

back port of #48020

We were not closing repositories on Node shutdown.
In production, this has little effect but in tests
shutting down a node using `MockRepository` and is
currently stuck in a simulated blocked-IO situation
will only unblock when the node's threadpool is
interrupted. This might in some edge cases (many
snapshot threads and some CI slowness) result
in the execution taking longer than 5s to release
all the shard stores and thus we fail the assertion
about unreleased shard stores in the internal test cluster.

Regardless of tests, I think we should close repositories
and release resources associated with them when closing
a node and not just when removing a repository from the CS
with running nodes as this behavior is really unexpected.

Fixes elastic#47689
@original-brownbear original-brownbear added :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs backport labels Oct 16, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/Snapshot/Restore)

@original-brownbear
Copy link
Member Author

Jenkins run elasticsearch-ci/1
Jenkins run elasticsearch-ci/packaging-sample-matrix

(infra issues)

@original-brownbear
Copy link
Member Author

Jenkins run elasticsearch-ci/2
Jenkins run elasticsearch-ci/packaging-sample-matrix
Jenkins run elasticsearch-ci/packaging-sample

@original-brownbear
Copy link
Member Author

Jenkins run elasticsearch-ci/packaging-sample-matrix

2 similar comments
@original-brownbear
Copy link
Member Author

Jenkins run elasticsearch-ci/packaging-sample-matrix

@original-brownbear
Copy link
Member Author

Jenkins run elasticsearch-ci/packaging-sample-matrix

@original-brownbear
Copy link
Member Author

Jenkins run elasticsearch-ci/packaging-sample-matrix

@original-brownbear
Copy link
Member Author

Jenkins run elasticsearch-ci/1

@original-brownbear original-brownbear merged commit 0ca7cc1 into elastic:7.x Oct 17, 2019
@original-brownbear original-brownbear deleted the 48020-7.x branch October 17, 2019 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants