From 77ff4dc4b8d16175e4ab8406965bc5b6e40d0838 Mon Sep 17 00:00:00 2001 From: Dom Dwyer Date: Wed, 1 Feb 2023 14:39:18 +0100 Subject: [PATCH] docs: retention period values in Namespace client Document the 0/null and negative value behaviours for retention periods in the namespace RPC client. --- influxdb_iox_client/src/client/namespace.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/influxdb_iox_client/src/client/namespace.rs b/influxdb_iox_client/src/client/namespace.rs index c91ebd50f1..f9bc513453 100644 --- a/influxdb_iox_client/src/client/namespace.rs +++ b/influxdb_iox_client/src/client/namespace.rs @@ -33,8 +33,11 @@ impl Client { /// Create a namespace /// - /// `retention_period_ns` is the the retention period in nanoseconds, measured from `now()`. - /// `None` represents infinite retention (i.e. never drop data). + /// `retention_period_ns` is the the retention period in nanoseconds, + /// measured from `now()`. `None` represents infinite retention (i.e. never + /// drop data), and 0 is also mapped to `None` on the server side. + /// + /// Negative retention periods are rejected, returning an error. pub async fn create_namespace( &mut self, namespace: &str, @@ -53,8 +56,11 @@ impl Client { /// Update retention for a namespace /// - /// `retention_period_ns` is the the retention period in nanoseconds, measured from `now()`. - /// `None` represents infinite retention (i.e. never drop data). + /// `retention_period_ns` is the the retention period in nanoseconds, + /// measured from `now()`. `None` represents infinite retention (i.e. never + /// drop data), and 0 is also mapped to `None` on the server side. + /// + /// Negative retention periods are rejected, returning an error. pub async fn update_namespace_retention( &mut self, namespace: &str,