Re: [CRDT_OP-in-CommitHook]

2017-03-02 Thread 李明
; > Cheers > > > > Russell > > > > > > > > *From:* riak-users [mailto:riak-users-boun...@lists.basho.com] *On Behalf > Of *?? > *Sent:* 02 March 2017 09:50 > *To:* Russell Brown > *Cc:* riak-users > *Subject:* Re: [CRDT_OP-in-CommitHook] > >

Re: [CRDT_OP-in-CommitHook]

2017-03-02 Thread 李明
Thanks Russell, Yes, it was a big trouble using the internal api, especially with very few knowledge about erlang. Have read the riak_kv_pb_crdt, but it confused me a lot. How to define a serial actor and is there a simple example creating an `riak_client:put` option object? The reason why i

Re: [CRDT_OP-in-CommitHook]

2017-03-02 Thread Russell Brown
Hi, You’re using internal details of the CRDT implementation, I’m not sure that is such a great idea. You always have your `Context` set to `undefined` but if your ops are all adds that shouldn’t matter in this case. The issue is that you’re calling `riak_kv_crdt:update` that needs to be called

[CRDT_OP-in-CommitHook]

2017-03-01 Thread 李明
Hi I am new to erlang and riak. I started to use riak as a kv store couple of months ago. Now i want to implement a commit hook to riak so that riak could help me to make some statistics. i read some docs and write a pre-hook scripts, which will fetch the object key and store it into a set.