All -

I have some test procedures that require that I start with an empty data store 
and end with the data exactly as it was before the test.

The brute force approach I'm taking now is to:

* shut down riak
* rename the data/bitcask directory
* start riak
* run my test and validate the results in riak
* shut down riak
* move the saved bitcask-xyz dir to bitcask again
* start riak

As you can see, I *really* want to start with no data, and end with no changes 
to the existing data.  Of course, if other users were accessing riak, this 
wouldn't work, but this is a test environment over which I have control.

My problem is that it takes a little time after running riak start or stop for 
the operation to complete, and so I have to insert a sleep afterwards so that 
the next step in the code is not performed prematurely.  Is there a way using 
the Ruby Riak client to know for sure whether or not riak is ready for action? 
I could loop every fraction of a second, or, if there were a blocking call, 
that would be even better.

That said, the shutting down and restarting is pretty drastic action.  Is there 
a faster/easier/better way to accomplish what I want to do?

Thanks,
Keith



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

Reply via email to