Skip to content

Use regex when searching on single file shares - #24203

Merged
MorrisJobke merged 1 commit into
masterfrom
enh/search_regex_file_shares
Nov 19, 2020
Merged

Use regex when searching on single file shares#24203
MorrisJobke merged 1 commit into
masterfrom
enh/search_regex_file_shares

Conversation

@rullzer

Copy link
Copy Markdown
Member

There is no need to consult the database when we want to search and
there are a lot of incomming single file shares. We can then just do a
regex and be done with it.

Signed-off-by: Roeland Jago Douma roeland@famdouma.nl

@icewind1991

Copy link
Copy Markdown
Member

Not a fan of doing this in the View, shouldn't it be possible to do this in the search methods in the sharedcache?

@rullzer

Copy link
Copy Markdown
MemberAuthor

Not a fan of doing this in the View, shouldn't it be possible to do this in the search methods in the sharedcache?

Let me see. I guess we can. This was just a first attempt to limit the query storm from searches.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer
rullzerforce-pushed the enh/search_regex_file_shares branch from 1a877c8 to eab4f3dCompareNovember 19, 2020 08:15
@rullzer

Copy link
Copy Markdown
MemberAuthor

Not a fan of doing this in the View, shouldn't it be possible to do this in the search methods in the sharedcache?

Yes I could.
I mean it is not per se less queries this way. But waaaayyyyy cheaper queries.

@rullzerrullzer added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Nov 19, 2020
@faily-bot

faily-botBot commented Nov 19, 2020

Copy link
Copy Markdown

🤖 beep boop beep 🤖

Here are the logs for the failed build:

Status of 35689: failure

mysql8.0-php7.4

Show full log
There was 1 error:
1) OCA\Files_Sharing\Tests\GroupEtagPropagationTest::testGroupReShareRecipientWrites
OCP\Files\NotFoundException: File with id "5230" has not been found.
/drone/src/lib/private/Files/View.php:1768
/drone/src/apps/files_sharing/tests/GroupEtagPropagationTest.php:106
/drone/src/apps/files_sharing/tests/PropagationTestCase.php:42
--
There were 2 warnings:
1) Test\Files\ViewTest::testRenameFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static
2) Test\Files\ViewTest::testCopyFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code makes sense 👍

@MorrisJobke
MorrisJobke merged commit 7004498 into masterNov 19, 2020
@MorrisJobke
MorrisJobke deleted the enh/search_regex_file_shares branch November 19, 2020 22:18
@MorrisJobke

Copy link
Copy Markdown
Member

@rullzer Backport to 20?

@rullzer

Copy link
Copy Markdown
MemberAuthor

@rullzer Backport to 20?

sure. I mean shouldn't hurt to much

@rullzer

Copy link
Copy Markdown
MemberAuthor

/backport to stable20

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsperformance 🚀

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@rullzer@icewind1991@MorrisJobke@ChristophWurst@geep33