https://github.com/yangyangyyy/cassandra/commit/c98795333c9c5252c9fb261aea0b7becf5b60da6
this has been described on the wiki , I recently needed such as thing, so implemented it above, and would like to contribute to the community. note that this uses a "Simplified" version of Bakery algorithm that provides no fairness, as the MAX() is replaced by a random choice pardon my beginner python usage :) thanks Yang