cassandra-reaper icon indicating copy to clipboard operation
cassandra-reaper copied to clipboard

Batch number of statement exceeding default Cassandra threshold

Open jbarotin opened this issue 3 years ago • 0 comments

Hi,

I've upgraded Reaper from 3.1 to 3.2 on a Cassandra cluster deployed on two different DC, the Cassandra version installed is 3.0.27.

I've also changed my configuration at the same time : before there was only one instance of reaper with the configuration datacenterAvailability: ALL, I installed a second instance of reaper in the other datacenter. I change configuration datacenterAvailability: EACH on both instance.

Since this, the following warning message appear in reaper logs:

WARN   [dc2-nio-worker-8] c.d.d.c.RequestHandler - Query '[126 statements, 1260 bound values] BEGIN UNLOGGED BATCH INSERT INTO node_metrics_v3 (cluster, metric_domain, metric_type, time_bucket, host, metric_scope, metric_name, ts, metric_attribute, value) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?); INSERT INTO node_metrics_v3 (cluster, metric_domain, metric_type, time_bucket, host, metric_scope, metric_name, ts, metric_attribute, value) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?); INSERT INTO node_metrics_v3 (cluster, metric_domain, metric_type, time_bucket, host, metric_scope, metric_name, ts, metric_attribu... [truncated output]' generated server side warning(s): Batch of prepared statements for [reaper_db.node_metrics_v3] is of size 8544, exceeding specified threshold of 5120 by 3424.

This is annoying, cause the default statement per batch is 5kb we can change this Cassandra setting to 10kb for example, but the best is to use the default value, so is it possible to reduce batch size ?

┆Issue is synchronized with this Jira Task by Unito ┆friendlyId: K8SSAND-1757 ┆priority: Medium

jbarotin avatar Aug 30 '22 15:08 jbarotin