Hello I am trying to enable post commit hook for my bucket type, and I can see it is configured in the bucket-type:
➜ idvt-riak git:(master) ✗ riak-admin bucket-type status change_log change_log is active active: true allow_mult: true basic_quorum: false big_vclock: 50 chash_keyfun: {riak_core_util,chash_std_keyfun} claimant: 'riak@127.0.0.1' dvv_enabled: true dw: quorum last_write_wins: false linkfun: {modfun,riak_kv_wm_link_walker,mapreduce_linkfun} n_val: 3 notfound_ok: true old_vclock: 86400 postcommit: [{struct,[{<<"mod">>,<<"idvt_hooks">>}, {<<"fun">>,<<"postcommit_batch">>}]}] pr: 0 precommit: [] pw: 0 r: quorum rw: quorum small_vclock: 50 w: quorum young_vclock: 20 The problem is that this hook never gets invoked. The module with the hook looks like: -module(idvt_hooks). -export([postcommit_batch/1]). postcommit_batch(Object) -> Data = binary_to_term(riak_object:get_value(Object)), file:write_file("/tmp/riak.tmp", "test"), io:format(standard_error, "~p~n", [Data]), Object. And whenever I create an object in the bucket with this bucket type, no file is created and no log message written (not in console.log, nor in error.log, not even in erl when running riak attach). I am using riak-erlang-client to create an object remotely, using something like this: Object = riakc_obj:new({BucketType, Bucket}, Id, Payload, ContentType), riakc_pb_socket:put(Pid, Object), I am wondering if anyone has experienced similar issue before or if someone might have any tips how to debug this problem. This behaves the same way on os x 10.11.3, latest homebrew build of riak and also in debian linux, latest riak. Thanks -- Adam Kovari
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com