From 167ec84eebb2fc7febd9c9e3e89f9adc8adb59f7 Mon Sep 17 00:00:00 2001 From: Benny Halevy Date: Thu, 29 Sep 2022 13:15:16 +0300 Subject: [PATCH] db/config: add compaction_collection_elements_count_warning_threshold Signed-off-by: Benny Halevy --- conf/scylla.yaml | 3 +++ db/config.cc | 2 ++ db/config.hh | 1 + docs/troubleshooting/large-rows-large-cells-tables.rst | 1 + 4 files changed, 7 insertions(+) diff --git a/conf/scylla.yaml b/conf/scylla.yaml index 76732fff48..7f0003a503 100644 --- a/conf/scylla.yaml +++ b/conf/scylla.yaml @@ -410,6 +410,9 @@ commitlog_total_space_in_mb: -1 # Log a warning when row number is larger than this value # compaction_rows_count_warning_threshold: 100000 +# Log a warning when writing a collection containing more elements than this value +# compaction_collection_elements_count_warning_threshold: 10000 + # How long the coordinator should wait for seq or index scans to complete # range_request_timeout_in_ms: 10000 # How long the coordinator should wait for writes to complete diff --git a/db/config.cc b/db/config.cc index d382fd875b..b91e330644 100644 --- a/db/config.cc +++ b/db/config.cc @@ -382,6 +382,8 @@ db::config::config(std::shared_ptr exts) "Log a warning when writing cells larger than this value") , compaction_rows_count_warning_threshold(this, "compaction_rows_count_warning_threshold", 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", value_status::Used, 10000, + "Log a warning when writing a collection containing more elements than this value") /* Common memtable settings */ , memtable_total_space_in_mb(this, "memtable_total_space_in_mb", value_status::Invalid, 0, "Specifies the total memory used for all memtables on a node. This replaces the per-table storage settings memtable_operations_in_millions and memtable_throughput_in_mb.") diff --git a/db/config.hh b/db/config.hh index 0e3136ada8..365de1b191 100644 --- a/db/config.hh +++ b/db/config.hh @@ -163,6 +163,7 @@ public: named_value compaction_large_row_warning_threshold_mb; named_value compaction_large_cell_warning_threshold_mb; named_value compaction_rows_count_warning_threshold; + named_value compaction_collection_elements_count_warning_threshold; named_value memtable_total_space_in_mb; named_value concurrent_reads; named_value concurrent_writes; diff --git a/docs/troubleshooting/large-rows-large-cells-tables.rst b/docs/troubleshooting/large-rows-large-cells-tables.rst index 37fe027b3b..75f9111a96 100644 --- a/docs/troubleshooting/large-rows-large-cells-tables.rst +++ b/docs/troubleshooting/large-rows-large-cells-tables.rst @@ -104,6 +104,7 @@ Configure the detection threshold of large rows and large cells with the corresp * ``compaction_large_row_warning_threshold_mb`` parameter (default: 10MB). * ``compaction_large_cell_warning_threshold_mb`` parameter (default: 1MB). +* ``compaction_collection_elements_count_warning_threshold`` parameter (default: 10000). Once the threshold is reached, the relevant information is captured in the ``system.large_rows`` / ``system.large_cells`` tables. In addition, a warning message is logged in the Scylla log (refer to :doc:`logging `).