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

Files are never deleted from blob cache directory? #2

Closed
alecghica opened this issue Apr 19, 2013 · 6 comments
Closed

Files are never deleted from blob cache directory? #2

alecghica opened this issue Apr 19, 2013 · 6 comments

Comments

@alecghica
Copy link

Hi,

I am using a ZEO client having this configuration:

shared-blob-dir off

Scenario:

  • I upload a file in Zope/Plone and access it will create both the blob files (on file-system) in both blob storage and in blob cache directories.
  • I delete the file from Zope/Plone.
  • File is deleted from the blob storage but not from the blob cache directory.

I also tried with a ZEO client having bellow configuration and got same result:

shared-blob-dir off
cache-size 350MB
blob-cache-size 70000000
blob-cache-size-check 10

Is this a bug or an intended feature? How can I force the deletion of those files from the blob cache directory?


Thx,
Alec

@jimfulton
Copy link
Member

On Fri, Apr 19, 2013 at 10:56 AM, Alexandru Ghica
notifications@github.com wrote:

Hi,

I am using a ZEO client having this configuration:

shared-blob-dir off
cache-size 350MB
blob-cache-size 70000000
blob-cache-size-check 10

Scenario:

I upload a file in Zope/Plone and access it will create both the blob
files (on file-system) in both blob storage and in blob cache directories.
I delete the file from Zope/Plone.
File is deleted from blob storage

I won't be deleted from the storage server until it is packed away.
When this happens will depend on your pack configuration.

but from blob cache.

Did you mean "not from the blob cache"?

Is this a bug or an intended feature?

Unless you remove them yourself, Blob files are only
removed from the when they are evicted by other data.

How can I force the deletion of
those files from the blob cache directory?

Delete the files yourself.

Jim

Jim Fulton
http://www.linkedin.com/in/jimfulton

@alecghica
Copy link
Author

To @jimfulton:

Q: Did you mean "not from the blob cache"?
Yes, I updated the issue description.

Q: How can I force the deletion of those files from the blob cache directory?
A: Delete the files yourself.
I can easily create a cron to do that, the question is how do I figure it out which files (not part of the storage anymore) should be deleted from the blob cache directory?

@jimfulton
Copy link
Member

Why do you care?

Deleting files is an optimization.

@alecghica
Copy link
Author

To @jimfulton: I just want to delete the files which are not into the system anymore, so those who remained under the blob cache directory with no reference into Zope/Plone (== useless). I need this as the real use-case is also using an blob-cache-size limitation of the blob cache directory size, so I don't want to keep there files which are not in use anymore.

Why do you care?
I don't want to delete files from blob cache which are in use as the real scenario involve huge amount of data, just the unnecessary ones.

@jimfulton
Copy link
Member

The cache will automatically evict old files when it needs to make room for new data.

@alecghica
Copy link
Author

@jimfulton: Thx for clarifications. I tested what you told me above and works fine, indeed no need to manually delete old files as they will be automatically deleted when blob cache storage need space.

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

No branches or pull requests

2 participants