unable to delete certain keys in a bucket

Luke Bakken lbakken at basho.com
Mon Sep 29 15:24:48 EDT 2014


Hi Hristo,

Please see my comments and questions inline...

> I am using riak version 1.4.10 and it is in a cluster with two hosts. I am
> unable to get rid of keys left over from previous operations using simple
> delete operations on keys.

Could you please try and delete the keys using "curl -vvv -XDELETE
http://...." and let us know the output? The "-vvv" argument will give
us the HTTP response code and will show all headers.

> When I list the keys for a bucket, it shows me
> the old keys, however if I try to retrieve the data associated with a key,
> no data is found.

Could you also paste the output when you retrieve a "deleted" key via
"curl -vvv -XGET http://...." ?

> Is there a way to wipe the keys in the bucket so it starts from a clean
> slate? I don't care about any of the data in riak, but I would rather not
> have to reinstall everything again. What would happen If I just delete
> everything from /var/lib in both hosts?

Don't delete everything from /var/lib - you'll delete the ring and
other important directories. Find the value of data_root for your data
backends, and then delete the contents of that directory. For
instance, /var/lib/riak/bitcask is the default data_root for bitcask,
so to delete all the data you'd execute the following on all hosts:

riak stop
rm -rf /var/lib/riak/bitcask/*
riak start

> I also noticed that recently I did an update, and one of my clusters was
> using leveldb as a backend and another was using bitcask. I updated the
> configs so that both are using bitcask, but I am wondering if there is some
> stale data left over. In one of the clusters in /var/lib there is still a
> leveldb folder. Is it safe to delete it?

Yes if you are sure the data is no longer needed.

--
Luke Bakken
Engineer / CSE
lbakken at basho.com




More information about the riak-users mailing list