-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Conversation
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
Pinging @elastic/es-distributed (:Distributed/Snapshot/Restore) |
Jenkins run elasticsearch-ci/1 (infra issues) |
Jenkins run elasticsearch-ci/2 |
Jenkins run elasticsearch-ci/packaging-sample-matrix |
2 similar comments
Jenkins run elasticsearch-ci/packaging-sample-matrix |
Jenkins run elasticsearch-ci/packaging-sample-matrix |
Jenkins run elasticsearch-ci/packaging-sample-matrix |
Jenkins run elasticsearch-ci/1 |
We were not closing repositories on Node shutdown.
In production, this has little effect but in tests
shutting down a node using
MockRepository
and iscurrently 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