Skip to content

Base shared cache on CacheJail - #21851

Merged
DeepDiver1975 merged 2 commits into
masterfrom
shared-unreadable
Jan 28, 2016
Merged

DeepDiver1975 merged 2 commits into
masterfrom
shared-unreadable

Conversation

@icewind1991

Copy link
Copy Markdown
Contributor

Started as part of "disable sharing for mounts" but I figured it's better to review this part separately.

Not only much, much smaller and easier to read but also 10% faster

cc @PVince81 @rullzer

@icewind1991 icewind1991 added this to the 9.0-current milestone Jan 22, 2016
@mention-bot

Copy link
Copy Markdown

By analyzing the blame information on this pull request, we identified @PVince81, @schiesbn and @butonic to be potential reviewers

@LukasReschke

Copy link
Copy Markdown
Contributor

Fails on PGSQL:

08:03:38 There were 32 errors:
08:03:38 
08:03:38 1) OCA\Files_sharing\Tests\SizePropagation::testSizePropagationWhenRecipientChangesFile
08:03:38 Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'UPDATE "oc_filecache" SET "size"=? WHERE ("size" <> ? ) AND "fileid" = ? ' with params [6, 6, "files\/sharedfolder\/4913"]:
08:03:38 
08:03:38 SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  invalid input syntax for integer: "files/sharedfolder/4913"
08:03:38 
08:03:38 /ssd/jenkins/workspace/core-ci-linux/database/pgsql/label/SLAVE/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php:91
08:03:38 /ssd/jenkins/workspace/core-ci-linux/database/pgsql/label/SLAVE/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:116
08:03:38 /ssd/jenkins/workspace/core-ci-linux/database/pgsql/label/SLAVE/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:836
08:03:38 /ssd/jenkins/workspace/core-ci-linux/database/pgsql/label/SLAVE/lib/private/db/connection.php:182
08:03:38 /ssd/jenkins/workspace/core-ci-linux/database/pgsql/label/SLAVE/lib/private/files/cache/cache.php:287
08:03:38 /ssd/jenkins/workspace/core-ci-linux/database/pgsql/label/SLAVE/lib/private/files/cache/wrapper/cachejail.php:116
08:03:38 /ssd/jenkins/workspace/core-ci-linux/database/pgsql/label/SLAVE/lib/private/files/cache/scanner.php:245
08:03:38 /ssd/jenkins/workspace/core-ci-linux/database/pgsql/label/SLAVE/lib/private/files/cache/scanner.php:199
08:03:38 /ssd/jenkins/workspace/core-ci-linux/database/pgsql/label/SLAVE/apps/files_sharing/lib/scanner.php:69
08:03:38 /ssd/jenkins/workspace/core-ci-linux/database/pgsql/label/SLAVE/lib/private/files/cache/scanner.php:290
08:03:38 /ssd/jenkins/workspace/core-ci-linux/database/pgsql/label/SLAVE/lib/private/files/cache/updater.php:120
08:03:38 /ssd/jenkins/workspace/core-ci-linux/database/pgsql/label/SLAVE/lib/private/files/view.php:304
08:03:38 /ssd/jenkins/workspace/core-ci-linux/database/pgsql/label/SLAVE/lib/private/files/view.php:1073
08:03:38 /ssd/jenkins/workspace/core-ci-linux/database/pgsql/label/SLAVE/lib/private/files/view.php:621
08:03:38 /ssd/jenkins/workspace/core-ci-linux/database/pgsql/label/SLAVE/apps/files_sharing/tests/sizepropagation.php:89
08:03:38 
08:03:38 Caused by
08:03:38 Doctrine\DBAL\Driver\PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  invalid input syntax for integer: "files/sharedfolder/4913"
08:03:38 
[snip]

@icewind1991

Copy link
Copy Markdown
Contributor Author

Fails on PGSQL:

Fixed

@PVince81

Copy link
Copy Markdown
Contributor

@icewind1991 mind explaining what this is about and how it works ?

@PVince81

Copy link
Copy Markdown
Contributor

and also what parts are affected / might need retesting ?

@icewind1991

Copy link
Copy Markdown
Contributor Author

mind explaining what this is about and how it works ?

The shared cache (storage to, but that's for another time) current has a lot of logic in it dating back from when we had the special /Shared folder so the cache had to combine multiple source storages into a single view.

Now a shared cache is mainly just a link to a file/folder on a different cache (with some optional permissions restrictions etc) which is a lot easier to handle since we no longer need to take multiple sources into account.

With this PR the shared cache becomes only wrapper around the source cache that limits it to a single directory and does some formatting on the cache entries

and also what parts are affected / might need retesting ?

Generic operations inside a share

@PVince81

Copy link
Copy Markdown
Contributor

Thanks a lot for the explanation, that makes a lot of sense!

@PVince81

Copy link
Copy Markdown
Contributor

Weird smashbox fail, possibly env related: HTTP request sent, awaiting response... 503 backend read error

@PVince81

Copy link
Copy Markdown
Contributor
  • TEST: shares/reshares with permissions still work
  • TEST: search files as recipient
  • TEST: move into share
  • TEST: smash

@PVince81

Copy link
Copy Markdown
Contributor

👍 local smashing succesfull, which covers etag propagation and reshares

@PVince81

Copy link
Copy Markdown
Contributor

@rullzer @schiesbn @nickvergessen second review ?

@PVince81

Copy link
Copy Markdown
Contributor

or @MorrisJobke

@MorrisJobke

Copy link
Copy Markdown
Contributor

Rebased

@MorrisJobke

Copy link
Copy Markdown
Contributor

Tested and works 👍

DeepDiver1975 added a commit that referenced this pull request Jan 28, 2016
@DeepDiver1975
DeepDiver1975 merged commit c11337e into master Jan 28, 2016
@DeepDiver1975
DeepDiver1975 deleted the shared-unreadable branch January 28, 2016 10:57
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants