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

Implement Search After based on refactored scroll-chan #52

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

axel-angel
Copy link
Contributor

We noticed some performance issue because we're solely using ES scroll to retrieve pages of results of our queries for "real-time" requests, however it's strongly discouraged in the doc. Here we opt to implement Search After which is very close to scroll-chan, the difference is the necessity to have a proper ordering through :sort

Note that this PR refactored and simplified scroll-chan plus we fixed a possible bug: we always pick the last scroll, acquired from the last page, which wasn't the case before. As described in the doc, we should always use the lastest scroll.

Other note, We noticed that chan->seq doesn't properly close the chan when the seq isn't entirely consumed. We also simplified it using simple clojure functions. This issue was already here and no idea how to fix it yet :/ Any idea welcomed.

@axel-angel
Copy link
Contributor Author

@mpenet Can you take a look and opinion on this?

@axel-angel
Copy link
Contributor Author

@mpenet I've revised and made new tests. Can you take a look for merging this? thank you

Also ensure we cleanup the testing index when the tests finished
@mpenet
Copy link
Owner

mpenet commented Apr 7, 2020

Hi,
I somehow didn't get any notification, I will have a look at it once I have a bit of free time, probably this week-end.

@axel-angel
Copy link
Contributor Author

Hi Max, no problem. Keep me updated or ping me if you need. Thanks.

@rborer
Copy link
Collaborator

rborer commented Apr 30, 2020

@mpenet FYI we've been running with this patch in prod since a few days & it's working fine.

@rborer
Copy link
Collaborator

rborer commented Apr 16, 2021

👋 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants