-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
feat(dav): introduce paginate with custom headers #48662
Conversation
4279ff1
to
6a915b2
Compare
6a915b2
to
582f9ee
Compare
pushed a minor change to better type return arrays |
582f9ee
to
645f5f7
Compare
Changed the queries to use |
08fffbc
to
d5bf59f
Compare
6ee049a
to
0026817
Compare
0026817
to
16cbf43
Compare
16cbf43
to
19704f6
Compare
19704f6
to
82a3d7c
Compare
7f6548c
to
b0afbce
Compare
@@ -228,6 +229,7 @@ public function __construct( | |||
$logger, | |||
$eventDispatcher, | |||
)); | |||
$this->server->addPlugin(\OCP\Server::get(PaginatePlugin::class)); |
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.
Should this also be added to ServerFactory?
(in apps/dav/lib/Connector/Sabre
)
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.
I don't know if there is a clear rule for that :/
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.
I do not remember the details, I think @skjnldsv knows.
From what I recall one is used for public pages and the other one for authenticated webdav or something like that? Which is why they do not have the exact same list of plugins loaded.
But quite frankly it should all be moved to the server factory, even if it stays 2 separate methods if needed.
b0afbce
to
3ac62bc
Compare
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.
Can you detail the performance and resources implication of this?
Any (paginated) propfind will add all its results to the cache (redis?), how big of an impact is that? That can be a huge list depending on the number of files in the folder, right?
Difficult to give a precise impact. It will depends of number of items in a directory, number of paginated requests… We implement this as a test to have first answers about it. |
But there is no trigger to enable/disable it? |
Only client will use it for now, and not everywhere |
Signed-off-by: Benjamin Gaussorgues <[email protected]>
Signed-off-by: Benjamin Gaussorgues <[email protected]>
3ac62bc
to
a14a598
Compare
@Altahrim since offsets are typically not scalable, at least for database operations, I'm wondering how the file list pagination behaves as the page number increases? Do you still have to build and discard entries lower than the offset or does the caching avoid rebuilding of the list? https://use-the-index-luke.com/sql/partial-results/fetch-next-page |
Once the cache is built, we'll fetch only the corresponding results from cache: https://github.com/nextcloud/server/pull/48662/files#diff-7dd44509fa2becb8b56ada8a254c14836090dd56baba7f4a10abb040cfa85351R62-R65 It's trickier when we build the cache since we always fetch all matching entries to cache them… |
Summary
Need a release of [4.6] Add event to allow inspecting and changing multipart responses sabre-io/dav#1549Checklist