Search code examples
erlangriakcrdtyokozuna

Riak max-counter


I'd like to implement sth like a max-counter using Riak's CRDTs to use w/ Yokozuna. The idea I had was to have a Riak map, two counters inside it, one to be modified, then the other to be updated to the max of both in a pre-commit hook. However, I can't seem to find a way to update a Riak map to do just that. Any help/better idea?


Solution

  • To query ranges w/ Yokozuna you actually can use a set and query it as if it were a counter, that seems to work