basho/riak_kv — pull request #1070 by russelldb (2014-12-30 17:11:50+00:00)
Title: Bug/rdb/gh679 actor epochs re rebase2.0

See riak_kv#679 and the associated platform_task RFC and summary.

This PR addresses the "doomstone", backup-restore, and some byzantine flavours of the kv679 bug.

The RFC explains the mechanism in detail but briefly:

add a persisted to disk vnode counter (persisted with leases, aysnc)
when ever a key is written to for the "first time" by a vnode, create an epoch actor for the key by concatenating vnodeid+counter (and increment the counter)
This ensures that a first time write for a key gets a new actor, this is the epoch for the key. It means we don't mix up deleted+re-created keys {a,1} event with the original {a, 1} event for some key, by ensuring an actor per epoch, without causing a keyspace wide actor explosion.

There are riak_tests at https://github.com/basho/riak_test/tree/rdb/gh-kv679

-----

This has been long running work, there is a PR here basho/riak_kv#1040 and here basho/riak_kv/pull/1053 that are closed in favour of this.

-----

- [ ] review
- [ ] benchmarking
- [ ] riak_test review
- [ ] add Kelly's EQC test