Riak Post-Commit Hooks在哪里运行?

pix*_*ort 7 erlang mapreduce commit riak

我正在尝试使用Riak的Post-Commit Hook来构建一个基于MapReduce的分布式增量索引,但是想知道Post-Commit Hook实际运行哪些Riak节点.它们是在客户端用于提交提交的节点上运行,还是在持久保存数据的主节点上运行?如果是后者,我想我可以从那里有效地做一个地图或减少并从输出中添加额外的记录.

sbr*_*ges 3

来自文档

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 
Run Code Online (Sandbox Code Playgroud)

riak_kv_put_fsm处理“Riak PUT 请求的协调”,因此提交后挂钩在协调节点上运行,即客户端将 put 发送到的节点。