我正在尝试评估使用Riak的Post-Commit Hooks来构建一个分布式的,增量的基于mapreduce的索引,但是想知道Post-Commit Hooks实际运行在哪个Riak节点上。它们是在客户端用于提交的节点上运行,还是在数据持久化的主节点上运行?如果是后者,我想我可以从那里有效地做一个映射或减少,并从输出中添加额外的记录。
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处理"Riak PUT请求的协调",因此post提交钩子在协调器节点上运行,即客户端发送PUT的节点。