I'm trying to evaluate using Riak's Post-Commit Hooks to build a distributed, incremental MapReduce-based index, but was wondering which Riak nodes the Post-Commit Hooks actually run on. Are they run on the nodes the client used to put the commits, or on the primary nodes where the data is persisted? If it's the latter, I'm thinking I can from there efficiently do a map or reduce and put additional records from the output.
Asked
Active
Viewed 532 times
1 Answers
3
From the docs
Post-commit hooks are run after the write has completed successfully.
Specifically,the hook function is called by riak_kv_put_fsm immediately
before the calling process is notified of the successful write
riak_kv_put_fsm handles "coordination of Riak PUT requests", so the post commit hook is run on the co-ordinator node, i.e. the node that the client sent the put to.

sbridges
- 24,960
- 4
- 64
- 71
-
Quick question: Is there any way to have the post commit hook be executed asynchronously? – arijeet Mar 30 '15 at 19:47