Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

leehuihua avatar image
leehuihua asked Erick Ramirez answered

What is replica filtering protection?

hi,

threre are many warning logs in my cassandra cluster:

"Replica filtering protection has cached over 2000 rows during query SELECT * FROM ..."

what does this warning logs mean?

Thanks

cassandra
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered

Replica filtering protection is a mechanism that ensures results from stale replicas for read consistency levels higher than ONE or LOCAL_ONE do not violate the required consistency. This only applies to (a) secondary index queries or (b) queries using ALLOW FILTERING.

You are getting the warning because your nodes are out-of-sync, most likely because they are overloaded and cannot keep up with writes so have lots of dropped mutations. For details, see CASSANDRA-8272 and CASSANDRA-15907.

You need to repair the problematic table to synchronise the replicas. You should also consider increasing the capacity of your cluster by adding more nodes so you don't end up with thousands of dropped mutations.

As a side note, you should not use ALLOW FILTERING without restricting the query to a single partition. Otherwise, it will not perform well and its behaviour can be unpredictable. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.