GithubHelp home page GithubHelp logo

Comments (5)

ppolewicz avatar ppolewicz commented on July 23, 2024 1

This duplicates in the large portion with the cli counterpart of Backblaze/b2-sdk-python#361 (already merged but not yet released due to a couple more PRs landing on the sdk side next week).

The basic idea would be to run b2 rm bucket-name '*' && b2 delete-bucket bucket-name and make it the responsibility of the user to make sure they are not uploading any more stuff to the bucket while they are trying to remove it completely.
Putting both in the same command could make sense, especially if we added --attempts 10 to try it many times in case some uploads keep landing - that'd be hard to achieve in a different way (without a special command to support it).

As for internals, it's a bit more complicated than in your design - the wildcard removal system uses a thread pool in order to increase performance - removing a file version is an io-bound call and putting those in python threads can make things much faster (here I believe it's nearly 10 times faster with default settings). Furthermore the streaming and backpressure are important considerations - a b2 bucket can contain a bazzilion objects and just their version ids might not fit within memory of the system that is trying to clean it. Anyway - that's merged now. I suggest that you wait for the cli counterpart of the mentioned PR to land and then chain that functionality in an optional mode of "delete-bucket", add a couple of tests and have a good feature.

I'm sorry about the review queue buildup, I've been horribly sick and could not review long PRs while two people were coding. I hope that clears up a lot in the next few days.

from b2_command_line_tool.

metadaddy avatar metadaddy commented on July 23, 2024 1

@ppolewicz Reopened and added new options.

from b2_command_line_tool.

metadaddy avatar metadaddy commented on July 23, 2024

@ppolewicz Please assign this one to me. I'll write some code and submit a PR. Thanks!

from b2_command_line_tool.

metadaddy avatar metadaddy commented on July 23, 2024

I suggest that you wait for the cli counterpart of the mentioned PR to land and then chain that functionality in an optional mode of "delete-bucket", add a couple of tests and have a good feature.

Sounds good to me!

I've been horribly sick and could not review long PRs while two people were coding. I hope that clears up a lot in the next few days.

Take it easy, and get well soon!

from b2_command_line_tool.

metadaddy avatar metadaddy commented on July 23, 2024

Closing now that 3.7.0 is available with rm command.

from b2_command_line_tool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.