question

leehuihua avatar image
leehuihua asked kohli edited

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
1 comment
10 |1000

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

kohli avatar image kohli commented ·

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

If you still have issue, you can get help from paintball at truepaintballer for detailed answer.

0 Likes 0 ·

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered Erick Ramirez edited

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!


Republished to DBA Stack Exchange.

Share
10 |1000

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