basho/riak_kv — pull request #1040 by russelldb (2014-11-11 11:04:20+00:00)
Title: Add per key actor epochs

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:

1. add a persisted to disk vnode counter (persisted with leases, aysnc)
2. 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.

I hope that is enough details for the review to start. I'll start work on EQC for the status_mgr and the new vnode functions in the mean time.