I have a Cassandra cluster of 2 nodes and a keyspace "test" with a replication factor of 2. The consistency level is All. I am running a spark job which dumps data in Cassandra database. So, the thing is in one spark job I dump the data multiple times in Cassandra database. Sometimes it shows me the following error:
not enough replicas available for query at consistency all (2 required but only 1 alive)
Problem is that if I run the same job again then it might or might not give this error.
Need help to understand why this error might be coming and why such an inconsistency in the error i.e. it is coming sometimes only.