-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
base: master
Are you sure you want to change the base?
Conversation
@mpenet Can you take a look and opinion on this? |
7adf2df
to
8cd2f2f
Compare
@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
8cd2f2f
to
9ebd2cb
Compare
Hi, |
Hi Max, no problem. Keep me updated or ping me if you need. Thanks. |
@mpenet FYI we've been running with this patch in prod since a few days & it's working fine. |
👋 😉 |
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.