Cassandra Snapshot Partition Key Change but seeing InvalidQueryException


For our application, we have changed partition key for snapshots table as mentioned below. Modified required statements and code for snapshot store to use appropriate query.

persistence_id, sequence_nr

Now when I try to recover them (as part of application restart) we see ReplayMessagesFailure with below error. Do I have to modify any other class that tries to query snapshots table?

java.util.concurrent.ExecutionException: com.datastax.driver.core.exceptions.InvalidQueryException: Cannot execute this query as it might involve data filtering and thus may have unpredictable performance. If you want to execute this query despite the performance unpredictability, use ALLOW FILTERING
	at ~[guava-22.0.jar:?]
	at ~[guava-22.0.jar:?]
	at$TrustedFuture.get( ~[guava-22.0.jar:?]

What was the reason for changing the partition key?

The query for recovery is typically looking for the N oldest snapshots, and by changing the partition key those queries will span more than one partition, and the exact sequence number isn’t known.