Vladimir,

Deletes are generally effectuated when doing "garbage collect", and such are 
triggered by adding data.  So eventually when you add more data the old items 
will not be copied into merged files.

This generally applies for log-structured stores like Bitcask, LevelDB and 
HanoiDB.  Even if the backends would have a specific handle to pull to do a 
"full cleanup", right now Riak doesn't have a way to invoke that from the front 
end.

If you really need it, we could maybe conjure up some script that you can run 
with a node down.  But that would have to run in off-line mode.

Kresten
Trifork


On Sep 13, 2012, at 12:01 PM, Vladimir Shapovalov 
<shapova...@gmail.com<mailto:shapova...@gmail.com>> wrote:

Hi again,

I noticed, that levelDB directory is not empty even after deleting all keys in 
whole cluster.
You mentioned that physical deletion is kind of delayed. Do you know the logic 
for how long it's delayed?
I'm wondering, because I've deleted all keys yesterday and still have about 3 
Gig in levelDB directory. On every node.
The same thing with index directory (merge_index).

Is it possible to delete keys in real? Or do I have just some configuration 
issues?

We've 3 node ver.1.2.

Thanks in advance!
Vladimir


On Wed, Sep 12, 2012 at 11:48 AM, Vladimir Shapovalov 
<shapova...@gmail.com<mailto:shapova...@gmail.com>> wrote:
Thank you guys for the explanations!

I use levelDB cause of search and also can't let keys expire due to application 
logic.
Then I'll implement postponed delete or something like this.

Cheers
Vladimir


On Tue, Sep 11, 2012 at 1:55 PM, Kresten Krab Thorup 
<k...@trifork.com<mailto:k...@trifork.com>> wrote:
Hi Vladimir,

Yes, deleting an object is actually more expensive than just marking it 
deleted.  What happens is that Riak will delete it in two steps, first it 
writes a tombstone record for the key, and then some time later it does the 
real delete.

When you do a delete, riak will return success as soon as it has saved the 
tombstone record.  It then installs a timer and runs a "real delete" later.  
Thus, if you delete *a lot* of objects, then you will have a bunch of pending 
"real deletes".

If you can let them expire that would be the most efficient way to get rid of 
them.  Bitcask and HanoiDB supports expiry.

Kresten


On Sep 11, 2012, at 12:08 PM, Vladimir Shapovalov 
<shapova...@gmail.com<mailto:shapova...@gmail.com><mailto:shapova...@gmail.com<mailto:shapova...@gmail.com>>>
 wrote:

HI all,

Is deleting a key more expensive operation then just marking it as deleted?

I noticed that delete a bunch of keys is quite expensive. All CPUs are fully 
utilized.

I can imagine that I can mark the key first and delete them some time later, 
e.q. not in rush hours.
What is actually the best way from your point of view to delete a key/keys?

Thanks in advance!
Vladimir
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com<mailto:riak-users@lists.basho.com><mailto:riak-users@lists.basho.com<mailto:riak-users@lists.basho.com>>
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



Mobile: + 45 2343 4626<tel:%2B%2045%202343%204626> | Skype: krestenkrabthorup | 
Twitter: @drkrab
Trifork A/S  |  Margrethepladsen 4  | DK- 8000 Aarhus C |  Phone : +45 8732 
8787<tel:%2B45%208732%208787>  |  
www.trifork.com<http://www.trifork.com/><http://www.trifork.com<http://www.trifork.com/>>









Mobile: + 45 2343 4626 | Skype: krestenkrabthorup | Twitter: @drkrab
Trifork A/S  |  Margrethepladsen 4  | DK- 8000 Aarhus C |  Phone : +45 8732 
8787  |  www.trifork.com<http://www.trifork.com>





_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to