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

Storage: wait option for delete_blobs method #22

Closed
VelizarVESSELINOV opened this issue Dec 19, 2019 · 2 comments
Closed

Storage: wait option for delete_blobs method #22

VelizarVESSELINOV opened this issue Dec 19, 2019 · 2 comments
Assignees
Labels
api: storage Issues related to the googleapis/python-storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@VelizarVESSELINOV
Copy link

Environment details

latest

Steps to reproduce

blobs = [1000000 blobs]
slow_create_blobs(blobs)
delete_blobs(blobs)
slow_create_blobs(blobs)
assert count_blobs(blobs) = big_number

An unpredictable result depends on delete_blobs how fast it is versus the slow_create_blobs

@emar-kar emar-kar changed the title Wait option for delete_blobs to finish Storage: wait option for delete_blobs method Dec 19, 2019
@emar-kar emar-kar self-assigned this Dec 19, 2019
@emar-kar
Copy link
Contributor

@VelizarVESSELINOV Good day, sir. I was trying to reproduce the conditions of the described issue and that is why I would like to clarify some questions:

  • slow_create_blobs(blobs) function is using upload_from_file or upload_from_string method? Is it possible to demonstrate it more specifically for the correct reproduction?
  • Correct me if I'm wrong, but you are trying to create blobs with the same names as in the original list which was marked for deletion?

As I can see through the API structure when you are using the delete_blobs method it is just sending the delete request per each blob and it is not returning anything. So we need to find out will a suitable solution affects the internal server behavior. I'll appreciate your help in resolving this situation and improvement of the user experience, thanks.

@crwilcox crwilcox transferred this issue from googleapis/google-cloud-python Jan 31, 2020
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/python-storage API. label Jan 31, 2020
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. triage me I really want to be triaged. labels Feb 3, 2020
@frankyn frankyn added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Feb 4, 2020
@IlyaFaer IlyaFaer self-assigned this Mar 4, 2020
@IlyaFaer
Copy link

IlyaFaer commented Mar 4, 2020

@VelizarVESSELINOV, code snippet in this issue doesn't give much of info, but I think, you're using Bucket.delete_blobs() method. If so, it doesn't seem that "wait" option is needed. According to Storage docs, object deletion is strong consistent. That means, if you called objects.delete method and it returned empty result, than object is already deleted from Storage (see the method docs). In other words, you don't need a "wait" option, as delete_blobs() will return only when all specified blobs will be truly deleted. Thus, it's already waiting.

Closing this issue. Feel free to reopen, if you have any concerns/propositions.

@IlyaFaer IlyaFaer closed this as completed Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/python-storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

5 participants