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

Added S3 inventory to storage purge #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mrtcode
Copy link
Member

@mrtcode mrtcode commented May 25, 2017

It seems that the current purge scripts are quite old. There are some incompatibilities. For example getLocalFileInfo($info) function wants 'zip' paprameter, but we don't have it, because all file names are just hashes. So it means we need a modified getLocalFileInfo function that doesn't use 'zip' parameter in query?

There was a 'TODO' mentioning to use SSCAN when it will be available in phpredis. Now phpredis supports getting multiple results with spop. What was the initial behind SSCAN? performance?


$info->filename = $key;
//$info->zip = ?;

$info = Zotero_Storage::getLocalFileInfo($info);
Copy link
Member Author

Choose a reason for hiding this comment

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

There is a short window between getting file info and deleting it, where it can be updated by other user and result in a missing S3 file. One option would be to move this code in transaction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant