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

Implement a 'forget bucket type' API endpoint (dev mode only) #119

Open
dmitrizagidulin opened this issue Dec 16, 2015 · 2 comments
Open
Milestone

Comments

@dmitrizagidulin
Copy link
Contributor

Currently, Riak does not allow users to clear/remove Bucket Types in any way (via command-line or API).

The reasoning is understandable -- if a bucket type was to be removed from the cluster metadata, all of the buckets and keys that "live" under it would be orphaned, and would no longer be accessible.

However, this is also very annoying while in development mode (or when testing anything related to bucket types) -- bucket types get created, and then stay forever. (Unless you completely clear and re-build the cluster).

How difficult would it be to implement an API call to "forget"/remove a bucket type from cluster metadata, while in Dev mode?
This operation would have several levels of safeguards:

  1. It would only be available in dev mode, as mentioned.
  2. On the GUI-side, pressing the 'Forget Bucket Type' button would pop up a warning, saying "Performing this operation is going to orphan all of the data that belongs to this bucket type -- all the buckets and keys under it will become inaccessible."
  3. Optionally, we can leverage our convenience devmode-only "Delete Bucket" method (that performs batch deletes of all the keys in a bucket's key list cache) to actually clear out all the data from a bucket type before erasing it from metadata.
@dmitrizagidulin dmitrizagidulin added this to the Wishlist milestone Dec 16, 2015
@drewkerrigan
Copy link
Contributor

I don't see a problem with utilizing the list buckets, then delete each bucket, then adding a bucket-type to an "ignore" or "tombstone" list that would just filter it from the results when listing types.

@dmitrizagidulin
Copy link
Contributor Author

That's a great idea (the delete list). Although it would only affect people looking at the bucket type list through the Explorer interface, but hey, that's still a huge win.

I'll see if I can make sense of the Riak cluster metadata system that stores the bucket types. to see what's involved.

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