Skip to content
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

Vfs: Clear up relationship between _type and pin state #7131

Merged
merged 1 commit into from
Apr 9, 2019

Conversation

ckamm
Copy link
Contributor

@ckamm ckamm commented Apr 4, 2019

The pin state is a per-item attribute that has an effect on _type:
AlwaysLocal dehydrated files will be marked for hydration and OnlineOnly
hydrated files will be marked for dehydration.

Where exactly this effect materializes depends on how the pin states are
stored. If they're stored in the db (suffix) the dbEntry._type is
changed during the discovery.

If the pin state is stored in the filesystem, the localEntry._type must
be adjusted by the plugin's stat callback.

This patch makes pin states behave more consistently between plugins.
Previously with suffix-vfs pin states only had an effect on new remote
files. Now the effect of pinning or unpinning files or directories is as
documented and similar to other plugins.

Note: This requires an extra db lookup per file. If you have suggestions for how to optimize, I'm all ears. It shouldn't have a large performance impact though since it's a very simple query.

The pin state is a per-item attribute that has an effect on _type:
AlwaysLocal dehydrated files will be marked for hydration and OnlineOnly
hydrated files will be marked for dehydration.

Where exactly this effect materializes depends on how the pin states are
stored. If they're stored in the db (suffix) the dbEntry._type is
changed during the discovery.

If the pin state is stored in the filesystem, the localEntry._type must
be adjusted by the plugin's stat callback.

This patch makes pin states behave more consistently between plugins.
Previously with suffix-vfs pin states only had an effect on new remote
files. Now the effect of pinning or unpinning files or directories is as
documented and similar to other plugins.
@ckamm ckamm added this to the 2.6.0 milestone Apr 4, 2019
@ckamm ckamm self-assigned this Apr 4, 2019
@ckamm ckamm requested a review from ogoffart April 4, 2019 08:43
@ckamm ckamm merged commit 04268be into master Apr 9, 2019
@delete-merged-branch delete-merged-branch bot deleted the vfs-unify-pin-and-type branch April 9, 2019 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants