-
Notifications
You must be signed in to change notification settings - Fork 17
Remove previous and next cache in SearchResult #177
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
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #177 +/- ##
==========================================
Coverage ? 99.33%
==========================================
Files ? 16
Lines ? 1642
Branches ? 439
==========================================
Hits ? 1631
Misses ? 11
Partials ? 0
Continue to review full report at Codecov.
|
| * @param {object} [aggregations] | ||
| * @param {object} [searchArgs] | ||
| * @param {KuzzleSearchResult} [previous] | ||
| * @property {Collection} dataCollection |
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.
???
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.
This states the object built by the constructor function has a defined property called dataCollection of type Collection
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.
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.
PR needs a more detailed description. I found no mention about next and previous search results in the docs.
Also don't understand why we had these before and why we take them out now.
|
@xbill82: |
|
@xbill82 Please refer to the connected ticket to know why we had to remove them. |
|
@dbengsch Thanks, I actually didn't really read the title of the issue (just got annoyed by the "no description" message, but the title is actually enough :) I understand that the problem is that they introduce a memory leak, but I've missed all the discussion that lead to the decision to take them out instead of fixing the mem leak. We can discuss it IRL if u prefer. |
|
@xbill82 This issue is severe enough imo to take immediate actions and remove this pseudo-functionality just right now. Users can very easily work around the removed previous options on client side by storing the whole dataset in a local collection but this is not what Kuzzle should do on its side by default. |
|
@xbill82 > this is not a memleak, since the used memory is not lost, but memory consumption. And that's the problem: there is no way to implement this feature without the client consuming too much memory. It has been decided to make this cursor "forward-only", as are many cursor implementations out there. |
|
@scottinet thanks for the details, now I get the point (and the severity) of the issue. |
Fix #176
_previousand_nextcache inSearchResultpreviousfunction that could't be reworked properly for a scroll