Hi, Cassandra expects a replication strategy to accept a description of a consistent hash ring and then use that description to determine what ranges on the consistent hash ring each node replicates.
If you implement the API those operations should all just work. I'm not sure what the implicit expectations of rebalancing and add/remove/node and so on are. This is despite the fact that I was staring at that code for 6 months 6 months ago. Most of the code basically looks at a before picture from the replication strategy, and an after picture and moves data around until those two match. Depending on the changes your replication strategy makes in responses to changes in the ring that code might not ship the data around. There are assumptions like when you move a node the data that needs to be streamed and fetched can all be done at that one node. You need to make sure that whatever state changes occur on ring changes can actually be realized by the add/remove/rebalance code. They also need to be done online in a system that is continuing to accept reads and writes so things like overlapping group memberships need to be taken into account. It's a hard problem, but easier to talk about once we know what you want the replication strategy to do. Ariel On Tue, Jan 29, 2019, at 3:52 PM, Seyed Hossein Mortazavi wrote: > I'm working on changing Cassandra for an academic project where the goal is > to change the replicas are determined for each partition using static > parameters that are set outside of Cassandra. I've read online that this > can be achieved by extending the AbstractReplicationStrategy class. I have > the following questions > > 1- If we add/remove nodes, and Cassandra goes through the process of > re-balancing, are functions from my class called? > 2- For Paxos lightweight transactions, are my functions called? > 3- Can I run into other problems? If yes, where? > > Thank you very much --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cassandra.apache.org For additional commands, e-mail: dev-h...@cassandra.apache.org