-
Notifications
You must be signed in to change notification settings - Fork 19
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: hint table for columns for sharded queries #1630
Conversation
b62092d
to
e13119e
Compare
@icewind1991 Do we have some docs on how to setup sharding and anything on how it works concept wise? |
Thanks for looking into this @juliusknorr As there are no instructions for testing i will compare with the groupfolders code you linked to and perform a general code check. Hope that works for you. |
Sorry forgot to update, we tried on daily, but didn't work, waiting for feedback from @icewind1991 first now |
84547db
to
36c0147
Compare
36c0147
to
db45b4a
Compare
Signed-off-by: Julius Knorr <[email protected]>
d5747aa
to
a90645c
Compare
->leftJoin('co', 'filecache', 'fc', $qb->expr()->eq('fc.name', $qb->expr()->castColumn('co.id', IQueryBuilder::PARAM_STR))) | ||
->where($qb->expr()->eq('co.id', $qb->createNamedParameter($id))) | ||
->andWhere($qb->expr()->eq('fc.parent', $qb->createNamedParameter($this->getFolderRootId()))) | ||
->andWhere($qb->expr()->eq('fc.storage', $qb->createNamedParameter($this->getRootFolderStorageId(), IQueryBuilder::PARAM_INT))); |
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.
cannot judge whether specifying the storage id is safe here. Could there be, for example, incoming shares?
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 will always be the storage id of the mount point and in the case of collectives the storage id of the root folder as collective data is stored in app data.
Signed-off-by: Robin Appelman <[email protected]>
a90645c
to
7118fb3
Compare
Fix #1619
Based on nextcloud/groupfolders#3483
For queries to the filecache we need to provide the sharding key (storage id) so the sharding logic in server can put the query to the right shard. https://github.com/nextcloud/collectives/pull/1630/files#diff-070d4f3f410c3f2fe7c8c4ab40af4884d62b754f28350d2bb0ebc4fc3f846117R208 is the most relevant change
CI run in #1634
Failure shown in nextcloud/collectives/actions/runs/12777873556/job/35619586742?pr=1634