From ca2b8352ac1db168db87f5b61bacbae766fc220f Mon Sep 17 00:00:00 2001 From: Taras Veretilnyk Date: Wed, 13 May 2026 13:47:32 +0200 Subject: [PATCH] db: add large_row_fail_threshold_mb config option Reject writes targeting a row whose on-disk size already exceeds this threshold (MB). Code default is 0 (disabled) for existing clusters; scylla.yaml ships 20 for new deployments. --- conf/scylla.yaml | 4 ++++ db/config.cc | 3 +++ db/config.hh | 1 + 3 files changed, 8 insertions(+) diff --git a/conf/scylla.yaml b/conf/scylla.yaml index 6fa9a2c50e..e2f9820f8f 100644 --- a/conf/scylla.yaml +++ b/conf/scylla.yaml @@ -432,6 +432,10 @@ large_partition_fail_threshold_mb: 2000 # Log a warning when writing rows larger than this value # compaction_large_row_warning_threshold_mb: 10 +# Reject writes to rows whose on-disk size exceeds this threshold (MB). +# Set to 0 to disable. +large_row_fail_threshold_mb: 20 + # Log a warning when writing cells larger than this value # compaction_large_cell_warning_threshold_mb: 1 diff --git a/db/config.cc b/db/config.cc index 19edebc554..8abdf31672 100644 --- a/db/config.cc +++ b/db/config.cc @@ -792,6 +792,9 @@ db::config::config(std::shared_ptr exts) , rows_count_fail_threshold(this, "rows_count_fail_threshold", liveness::LiveUpdate, value_status::Used, 0, "Reject writes targeting a partition whose on-disk row count already exceeds this threshold, as recorded in any SSTable's large data records. " "Set to 0 to disable.") + , large_row_fail_threshold_mb(this, "large_row_fail_threshold_mb", liveness::LiveUpdate, value_status::Used, 0, + "Reject writes targeting a partition that contains any row whose on-disk size already exceeds this threshold in MB, as recorded in any SSTable's large data records. " + "Set to 0 to disable.") , compaction_rows_count_warning_threshold(this, "compaction_rows_count_warning_threshold", liveness::LiveUpdate, value_status::Used, 100000, "Log a warning when writing a number of rows larger than this value.") , compaction_collection_elements_count_warning_threshold(this, "compaction_collection_elements_count_warning_threshold", liveness::LiveUpdate, value_status::Used, 10000, diff --git a/db/config.hh b/db/config.hh index c02a905eaf..be60a3f257 100644 --- a/db/config.hh +++ b/db/config.hh @@ -227,6 +227,7 @@ public: named_value compaction_large_cell_warning_threshold_mb; named_value large_partition_fail_threshold_mb; named_value rows_count_fail_threshold; + named_value large_row_fail_threshold_mb; named_value compaction_rows_count_warning_threshold; named_value compaction_collection_elements_count_warning_threshold; named_value compaction_large_data_records_per_sstable;