Fork post-snapshot-delete cleanup off master thread#122731
Fork post-snapshot-delete cleanup off master thread#122731elasticsearchmachine merged 5 commits intoelastic:mainfrom
Conversation
We shouldn't run the post-snapshot-delete cleanup work on the master thread, since it can be quite expensive and need not block subsequent cluster state updates. This commit forks it onto a `SNAPSHOT` thread.
|
Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination) |
|
Hi @DaveCTurner, I've created a changelog YAML for you. |
| snapshot.create: | ||
| repository: test_repo_create_1 | ||
| snapshot: barrier_snapshot | ||
| wait_for_completion: true |
There was a problem hiding this comment.
Nice, I had a look at this as well when the original problems popped up. I investigated adding a
- do:
tasks.list:
actions: cluster:admin/snapshot/delete
wait_for_completion: trueto the end of the test, but looking at the code, the task completing didn't necessarily mean the delete had occurred?
There was a problem hiding this comment.
I think it does. My understanding that deletion request goes into snapshotDeletionListeners and proceed with deletion, update cluster state when deletion is complete, and notify snapshotDeletionListeners on cluster state update. I guess it comes to the repository implementation, if delete calls are synchronous, otherwise we need to pull state...
There was a problem hiding this comment.
In the ?wait_for_completion=false case we don't register the listener with snapshotDeletionListeners:
elasticsearch/server/src/main/java/org/elasticsearch/snapshots/SnapshotsService.java
Lines 2227 to 2231 in aac1409
|
LGTM |
We shouldn't run the post-snapshot-delete cleanup work on the master thread, since it can be quite expensive and need not block subsequent cluster state updates. This commit forks it onto a `SNAPSHOT` thread.
We shouldn't run the post-snapshot-delete cleanup work on the master thread, since it can be quite expensive and need not block subsequent cluster state updates. This commit forks it onto a `SNAPSHOT` thread.
We shouldn't run the post-snapshot-delete cleanup work on the master thread, since it can be quite expensive and need not block subsequent cluster state updates. This commit forks it onto a `SNAPSHOT` thread.
We shouldn't run the post-snapshot-delete cleanup work on the master
thread, since it can be quite expensive and need not block subsequent
cluster state updates. This commit forks it onto a
SNAPSHOTthread.