You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Andres de la Peña (Jira)" <ji...@apache.org> on 2022/06/15 11:42:00 UTC

[jira] [Comment Edited] (CASSANDRA-17151) Guardrail for column size

    [ https://issues.apache.org/jira/browse/CASSANDRA-17151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17554529#comment-17554529 ] 

Andres de la Peña edited comment on CASSANDRA-17151 at 6/15/22 11:41 AM:
-------------------------------------------------------------------------

The proposed patch adds a new guardrail called {{{}column_value_size{}}}:
{code:java}
column_value_size_warn_threshold:
column_value_size_fail_threshold:
{code}
||PR||CI||
|[trunk|https://github.com/apache/cassandra/pull/1684]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1702/workflows/1a1f7823-8455-4011-9209-fcd714390327] [j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/1702/workflows/b7be7248-fbc4-4331-a51f-71180ad2b688]|

This guardrail is different to the current {{max_value_size}} limit. {{max_value_size}} was added by CASSANDRA-9530 as a check when deserializing any value, in order to detect sstable corruption once it has happened. It has a default value of 256MB. Differently, the proposed guardrail is checked on the CQL layer to reject regular user queries trying to insert too large columns, before we even perform any write. It probably will have a value of a few MB when used, lesser than {{max_value_size}}.

The guardrail is only applied to the values of regular columns because both the serialized partitions keys and the values of the components of the clustering key already have a fixed, relatively small size limit of 65535 bytes. This size limit is hardcoded and it cannot be changed. It will be probably lesser than any useful guardrail value, so we can probably save us checking the guardrail for the primary key columns.


was (Author: adelapena):
The proposed patch adds a new guardrail called {{column_value_size}}:
{code}
column_value_size_warn_threshold:
column_value_size_fail_threshold:
{code}
||PR||CI||
|[trunk|https://github.com/apache/cassandra/pull/1684]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/1702/workflows/1a1f7823-8455-4011-9209-fcd714390327] [j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/1702/workflows/b7be7248-fbc4-4331-a51f-71180ad2b688]|

This guardrail is different to the current {{max_value_size}} limit. {{max_value_size}} was added by CASSANDRA-9530 as a check when deserializing any value to detect sstable corruption. It has a default value of 256MB. Differently, the proposed guardrail is checked on the CQL layer to reject regular user queries trying to insert too large columns, before we even perform any write. It probably will have a value of a few MB when used.

The guardrail is only applied to the values of regular columns because both the serialized partitions keys and the values of the components of the clustering key already have a fixed, relatively small size limit of 65535 bytes. This size limit will be probably lesser than any useful guardrail value, so we can probably save us checking the guardrail for the primary key columns.


> Guardrail for column size
> -------------------------
>
>                 Key: CASSANDRA-17151
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17151
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Feature/Guardrails
>            Reporter: Andres de la Peña
>            Assignee: Andres de la Peña
>            Priority: Normal
>             Fix For: 4.x
>
>
> Add a guardrail for limiting the max size of column values, for example:
> {code}
> # Failure threshold to prevent writing large column values.
> # Defaults to -1 to disable.
> column_value_size_failure_threshold_in_kb: -1
> {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org