commit hooks and parameters

Sean Cribbs sean at basho.com
Tue Apr 26 10:05:51 EDT 2011


Jon,

If you're using a precommit, it could easily strip those extra metadata headers from the object, since it is allowed to modify the object.  Kresten has written some code in riak_link_index that captures extra information in a precommit and then acts on them in a postcommit.  As long as your postcommit is structured properly, you could turn actions on and off with a bucket property or metadata header.

Sean Cribbs <sean at basho.com>
Developer Advocate
Basho Technologies, Inc.
http://basho.com/

On Apr 26, 2011, at 9:58 AM, Jon Brisbin wrote:

> Do commit hooks (pre/post/whatever) have any access to parameters of any kind (other than document metadata headers)? Can I get the webmachine parameters for a given request, for instance?
> 
> I'm wanting to find a way to alter behaviour of the hook for each request. The only way I can see to do that now is to pass metadata headers, which get stored with the document (in the case of a postcommit hook) which is not always what I want.
> 
> I'd really like the ability to temporarily suspend triggering of the hook for a "batch" of operations. The only way I can see to do that now is to actually remove the hook from the bucket completely and re-set it afterwards.
> 
> Is there a better way to go about this?
> 
> Thanks!
> 
> Jon Brisbin
> 
> http://jbrisbin.com
> Twitter: @j_brisbin
> 
> 
> 
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com





More information about the riak-users mailing list