On Thu, Sep 20, 2012 at 1:06 AM, Hải Lưu Tuấn <eminter25...@gmail.com> wrote:
>
> If there are 2 (or more) threads use this function at a same time, it will
> cause error. Assume that both thread A and thread B have retrieved the keys
> list (use bucket.get_keys()), and thread A deleted all of the old passwords
> in the bucket, then when thread B tried to execute:
>
[snip]

It sounds like if you do it this way, you're going to run into
scalability issues down the road. (what happens when say, 10 users use
this function at the same time?)

Why not have a crontab (or a script daemonized with daemontools) run
this code every 5 minutes instead?  It will completely sidestep the
current issue you're seeing, and should scale much better.

-- Doug

-- 
http://twitter.com/dmuth

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

Reply via email to