cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tania S Engel (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-10876) Alter behavior of batch WARN and fail on single partition batches
Date Tue, 05 Jun 2018 15:29:00 GMT


Tania S Engel commented on CASSANDRA-10876:

Cassandra data models are based on queries so tables can often be the same partition key with
different frequently queried data points making up the clustering keys. In that case, the
data being the same, it's also quite common to want to atomically batch insert the data. In
this example, which I also posted on stack overflow,


would the coordinator farm these inserts out to different nodes given a RF < nodes? Or
would the partition key, albeit in different tables, hash to the same value? I ask because
of all the recommendations not to use multiple partition batches. And, in our design we are
still seeing these batch_size_warn_threshold warnings in 3.11.1. 


use logskeyspace;

CREATE TABLE Log_User(LogDay timestamp, UserId int, EventId int) PRIMARY KEY (Day, UserId)

CREATE TABLE Log_Event(LogDay timestamp, EventId int,  UserId int) PRIMARY KEY (Day, EventId)


INSERT INTO Log_User(LogDay timestamp,  UserId int, EventId int) VALUES("2018-03-21 00:00Z",
10, 23);

INSERT INTO Log_Event(LogDay timestamp, EventId int,  UserId int) VALUES("2018-03-21 00:00Z",
23, 10);


> Alter behavior of batch WARN and fail on single partition batches
> -----------------------------------------------------------------
>                 Key: CASSANDRA-10876
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Patrick McFadin
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>              Labels: lhf
>             Fix For: 3.6
>         Attachments: 10876.txt
> In an attempt to give operator insight into potentially harmful batch usage, Jiras were
created to log WARN or fail on certain batch sizes. This ignores the single partition batch,
which doesn't create the same issues as a multi-partition batch. 
> The proposal is to ignore size on single partition batch statements. 
> Reference:
> [CASSANDRA-6487|]
> [CASSANDRA-8011|]

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message