Hey Yousuf,

I'm not sure there's a way to make this cheaper for you. You're going
to have to do a GET and work with the not-founds. The alternative
would be a HEAD request for the key, which would just return the
metadata. This won't save you any time on the request but might cut
down on client-server bandwidth (which may or may not be an issue
depending how many PC hooks you're firing off).

You could use "if_none_match" but that's still going to result in a full read.

Hope that helps.

Mark

On Fri, Aug 24, 2012 at 3:29 AM, Yousuf Fauzan <[email protected]> wrote:
> Hello,
>
> I have written a post commit hook on one of my buckets such that every time
> data is stored, it creates a new object in another bucket and stores it.
>
> My problem is that I do not wish to overwrite existing object in this other
> bucket. The way I am achieving this right now is pretty crude, I try getting
> the object and if its not found then I store it otherwise not.
>
> Is there a flag like if_none_match for riak local client? If not, is there
> any other way to do the above without issuing a get first?
>
> --
> Yousuf
> http://fauzism.com
>
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>

_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to