-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Fix reindex from remote clearing scroll #22525
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
Fix reindex from remote clearing scroll #22525
Conversation
|
@javanna, can you have a look at this one? It is another thing with reindex-from-remote and being super careful with the client. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happened to all of these tests? They are already in the docs so we can remove them from here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Sorry, I meant to leave that comment. I made those before we ran the docs snippets. I should have removed them in another PR but I figured I could leave a comment and defend it. I promptly forgot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok I assume that we got test coverage besides docs tests and those ones were copied from the docs just to make sure that the docs were correct, which is not needed anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right!
javanna
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reindex-from-remote had a race when it tried to clear the scroll. It first starts the request to clear the scroll and then submits a task to the generic threadpool to shutdown the client. These two things race and, in my experience, closing the scroll generally loses. That means that most of the time reindex-from-remote isn't clearing the scrolls that it uses. This isn't the end of the world because we flush old scroll contexts after a while but this isn't great. Noticed while experimenting with elastic#22514.
0a60a04 to
b75edad
Compare
Reindex-from-remote had a race when it tried to clear the scroll. It first starts the request to clear the scroll and then submits a task to the generic threadpool to shutdown the client. These two things race and, in my experience, closing the scroll generally loses. That means that most of the time reindex-from-remote isn't clearing the scrolls that it uses. This isn't the end of the world because we flush old scroll contexts after a while but this isn't great. Noticed while experimenting with #22514.
Reindex-from-remote had a race when it tried to clear the scroll. It first starts the request to clear the scroll and then submits a task to the generic threadpool to shutdown the client. These two things race and, in my experience, closing the scroll generally loses. That means that most of the time reindex-from-remote isn't clearing the scrolls that it uses. This isn't the end of the world because we flush old scroll contexts after a while but this isn't great. Noticed while experimenting with #22514.
Reindex-from-remote had a race when it tried to clear the scroll. It
first starts the request to clear the scroll and then submits a task
to the generic threadpool to shutdown the client. These two things
race and, in my experience, closing the scroll generally loses. That
means that most of the time reindex-from-remote isn't clearing the
scrolls that it uses. This isn't the end of the world because we
flush old scroll contexts after a while but this isn't great.
Noticed while experimenting with #22514.