Multiple migration might run at once.
Migration is a process/feature in cassandra which moves the database from one keyspace to another. The use case can be migrating (enlarging) from 3 node cluster to 10 node cluster.
no, no dataloss
Standard configuration before migration. Add one more node during migration.
1) add empty node
2) start cassandra migration (feature start)
After defining a new keyspace. We need to run database migration. During the migration phase, multiple migrations ran at the same time.
Backwards inference requires lots of domain knowledge. The service.MigrationManager class manages a MIGRATION_STAGE where nodes should execute db.migration.Migration instances.
The problem is that the node that a client connects to via Thrift or Avro initiates the migration in their client thread (calls migration.apply). Instead, the Thrift and Avro clients should ensure that the migration occurs in MIGRATION_STAGE, and should block until the migration is applied by the stage.
To summarize, the client should block further migration attempts if one migration is already in progress. Also, when applying the migration through a client, the database should be put into “MIGRATION_STAGE”.
Implementation of migration feature on the client is incorrect. Cassandra needs to be put into MIGRATION_STAGE mode in order to perform migration.
The fix is to put the database in MIGRATION STAGE when migrating and block further migration requests.
no more exception