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

CloudStorage checker can get false-negative related to eventual consistency (needs less invasive method, too?) #138

Open
worldofswift opened this issue Dec 11, 2018 · 0 comments

Comments

@worldofswift
Copy link

Given PragmaRX\Health\Checkers\CloudStorage:

The logic of checker is straightforward:

  1. We put the new file to the disk
  2. We check it existence
  3. We delete it

For local filesystems, it will work fine, but for example s3 it is undesired order of actions:

  1. S3 guarantees consistency for newly created objects.
  2. But for deletes and overwrites with PUT, it doesn't guarantee it. (I don't remember the actual timings).
  3. As a result, we can get into a situation with consequential checks - in the previous one we just deleted an object, in current we add a new object with the same name and it actually considered as overriding, so now it is possible to get file not found exception during an attempt to get content from that file (new version hasn't propagated yet to replace deleted one).

Please note, that the delete action is not a key here - it is similar to PUT request.

So, this checker is inappropriate for S3 with short grace.

Possible workaround:

  1. Force to not using constant strings as the file name
  2. Add some small hash (maybe 4 letters UUID will be good enough) internally to the value of filename in the checker.
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

1 participant