Delete bucket type
mkessler at basho.com
Thu Sep 29 08:02:39 EDT 2016
On 28 September 2016 at 17:59, Nguyen, Kyle <kyle.nguyen at philips.com> wrote:
> Thank you for your quick reply, Magnus! We’re considering using bucket
> type to support multi-tenancy in our system. Hence, all objects stored
> within the namespace of the bucket type and bucket type need to be removed
> once the client has decided to opt-out.
Riak uses bucket-types and buckets primarily as a name space. In a default
configuration, the bucket type and bucket names are hashed together with
the key, and this hash determines the location of a given object on the
ring. This concept is known as consistent hashing and ensures that there
are no hot spots and that data is evenly distributed across the partitions.
Riak does *NOT* keep data stored under different bucket types or buckets
separate from each other. Therefore, in order to delete all data stored
under a given bucket type or bucket, it is necessary to delete each
matching object individually. Furthermore, Riak does not keep an index of
objects stored in a bucket type or bucket.
It is possible to obtain lists of these objects via key-listing or
mapreduce. However, these are very expensive operations in Riak and should
be avoided in a high availability production cluster.
You should also be aware of how deletion in Riak works. When an object is
deleted, a tombstone is placed into the database (effectively an empty
object with some additional metadata). Tombstones are eventually reaped
during merging (bitcask) or compaction (leveldb) phases of the backend
storage. However, there is no guarantee when this actually happens, and in
particular with leveldb it can take a long time for any particular object
to be actually deleted from disk.
Please let me know if you have any additional questions regarding this
Client Services Engineer
Basho Technologies Limited
Registered Office - 8 Lincoln’s Inn Fields London WC2A 3BP Reg 07970431
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the riak-users