[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cassandra-dev
Subject:    Re: Implementing an Abstract Replication Strategy
From:       Ariel Weisberg <ariel () weisberg ! ws>
Date:       2019-01-29 22:33:04
Message-ID: 1548801184.1273625.1646465920.40B01AA2 () webmail ! messagingengine ! com
[Download RAW message or body]

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-unsubscribe@cassandra.apache.org
For additional commands, e-mail: dev-help@cassandra.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic