From bfddb032ce13bb2351d32113fa21c24bc774f9ca Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Mon, 27 Jun 2022 17:52:40 -0400 Subject: [PATCH] docs: improve docs for `persist_partition_size_threshold_bytes` / `INFLUXDB_IOX_PERSIST_PARTITION_SIZE_THRESHOLD_BYTES` (#4877) * docs: improve docs for `persist_partition_size_threshold_bytes` / `INFLUXDB_IOX_PERSIST_PARTITION_SIZE_THRESHOLD_BYTES` * docs: improve comments about LifecycleConfig::partition_size_threshold Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- clap_blocks/src/ingester.rs | 8 ++++++-- influxdb_iox/src/commands/run/all_in_one.rs | 8 ++++++-- ingester/src/lifecycle.rs | 10 ++++++++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/clap_blocks/src/ingester.rs b/clap_blocks/src/ingester.rs index cc787990c3..1c7d8ddadd 100644 --- a/clap_blocks/src/ingester.rs +++ b/clap_blocks/src/ingester.rs @@ -37,8 +37,12 @@ pub struct IngesterConfig { )] pub persist_memory_threshold_bytes: usize, - /// If an individual partition crosses this size threshold, it will be persisted. - /// The default value is 300MB (in bytes). + /// If the total bytes written to an individual partition crosses + /// this size threshold, it will be persisted. The default value + /// is 300MB (in bytes). + /// + /// NOTE: This number is related, but *NOT* the same as the size + /// of the memory used to keep the partition buffered. #[clap( long = "--persist-partition-size-threshold-bytes", env = "INFLUXDB_IOX_PERSIST_PARTITION_SIZE_THRESHOLD_BYTES", diff --git a/influxdb_iox/src/commands/run/all_in_one.rs b/influxdb_iox/src/commands/run/all_in_one.rs index 9fa3e623b0..191c450d58 100644 --- a/influxdb_iox/src/commands/run/all_in_one.rs +++ b/influxdb_iox/src/commands/run/all_in_one.rs @@ -208,8 +208,12 @@ pub struct Config { )] pub persist_memory_threshold_bytes: usize, - /// If an individual partition crosses this size threshold, it will be persisted. - /// The default value is 300MB (in bytes). + /// If the total bytes written to an individual partition crosses + /// this size threshold, it will be persisted. The default value + /// is 300MB (in bytes). + /// + /// NOTE: This number is related, but *NOT* the same as the size + /// of the memory used to keep the partition buffered. #[clap( long = "--persist-partition-size-threshold-bytes", env = "INFLUXDB_IOX_PERSIST_PARTITION_SIZE_THRESHOLD_BYTES", diff --git a/ingester/src/lifecycle.rs b/ingester/src/lifecycle.rs index e3560d7ce5..50af76e9b6 100644 --- a/ingester/src/lifecycle.rs +++ b/ingester/src/lifecycle.rs @@ -136,8 +136,14 @@ pub struct LifecycleConfig { /// partitions currently buffered until it falls below this threshold. An ingester running /// in a steady state should operate around this amount of memory usage. persist_memory_threshold: usize, - /// If an individual partition crosses this threshold, it will be persisted. The purpose of this - /// setting to to ensure the ingester doesn't create Parquet files that are too large. + /// If the total bytes written to an individual partition crosses + /// this threshold, it will be persisted. + /// + /// NOTE: This number is related, but *NOT* the same as the size + /// of the memory used to keep the partition buffered. + /// + /// The purpose of this setting to to ensure the ingester doesn't + /// create Parquet files that are too large. partition_size_threshold: usize, /// If an individual partitiion has had data buffered for longer than this period of time, the /// manager will persist it. This setting is to ensure we have an upper bound on how far back