Add interface to allow "more direct" access to the filecache without direct db#44044
Closed
icewind1991 wants to merge 4 commits intomasterfrom
Closed
Add interface to allow "more direct" access to the filecache without direct db#44044icewind1991 wants to merge 4 commits intomasterfrom
icewind1991 wants to merge 4 commits intomasterfrom
Conversation
17ea359 to
39b1c7c
Compare
39b1c7c to
5f5b0ff
Compare
a14aa3a to
224966c
Compare
45 tasks
19ff9e6 to
dc9729e
Compare
f6dc6a2 to
3dc3ee4
Compare
3dc3ee4 to
df7f85b
Compare
Merged
artonge
reviewed
Mar 25, 2024
Merged
come-nc
reviewed
Mar 25, 2024
| } else { | ||
| $qb->andWhere($qb->expr()->like('f.path', $qb->createNamedParameter($this->dbConnection->escapeLikeParameter($node->getInternalPath()) . '/%'))); | ||
| } | ||
| $qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId()))); |
Contributor
There was a problem hiding this comment.
What is this change about?
Comment on lines
+83
to
+85
| $shareManager->getSharesBy($user->getUID(), IShare::TYPE_USER), | ||
| $shareManager->getSharesBy($user->getUID(), IShare::TYPE_GROUP), | ||
| $shareManager->getSharesBy($user->getUID(), IShare::TYPE_ROOM), |
Contributor
There was a problem hiding this comment.
Where did the $src parameter go?
| @@ -0,0 +1,100 @@ | |||
| <?php | |||
|
|
|||
| $results = []; | ||
| while ($row = $result->fetch()) { | ||
| $results[$row['user_id']] = $row['size']; | ||
| $results[$row['user_id']] = $this->getSizeForHomeStorage($row['storage_id']); |
Contributor
There was a problem hiding this comment.
This means one query per row instead of getting all sizes in the first query, no?
| @@ -0,0 +1,76 @@ | |||
| <?php | |||
|
|
|||
… do direct db queries Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
df7f85b to
015988b
Compare
Member
Author
|
Let me split out the interface and changes to remove filecache joins to simplify reviewing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds and interface for the filecache that is lower level than the "normal" filesystem apis to allow for some more optimized retrieval of filecache data without requiring direct database access.
This will be needed when we start restricting direct database access to the filecache for sharding.
Pr comes with a few cases of replacing direct-db with the new interface.
extracted from #43576