diff --git a/nodejs/src/lib.rs b/nodejs/src/lib.rs index f241fb81f..53c630c93 100644 --- a/nodejs/src/lib.rs +++ b/nodejs/src/lib.rs @@ -24,15 +24,19 @@ mod util; #[napi(object)] #[derive(Debug)] pub struct ConnectionOptions { - /// (For LanceDB OSS only): The interval, in seconds, at which to check for - /// updates to the table from other processes. If None, then consistency is not - /// checked. For performance reasons, this is the default. For strong - /// consistency, set this to zero seconds. Then every read will check for - /// updates from other processes. As a compromise, you can set this to a - /// non-zero value for eventual consistency. If more than that interval - /// has passed since the last check, then the table will be checked for updates. - /// Note: this consistency only applies to read operations. Write operations are + /// The interval, in seconds, at which to check for updates to the table + /// from other processes. If None, then consistency is not checked. For + /// performance reasons, this is the default. For strong consistency, set + /// this to zero seconds. Then every read will check for updates from other + /// processes. As a compromise, you can set this to a non-zero value for + /// eventual consistency. If more than that interval has passed since the + /// last check, then the table will be checked for updates. Note: this + /// consistency only applies to read operations. Write operations are /// always consistent. + /// + /// Stronger consistency is not free. The smaller the interval, the more + /// often each read pays the cost of checking for updates against object + /// storage, raising per-read latency and cost. pub read_consistency_interval: Option, /// (For LanceDB OSS only): configuration for object storage. /// diff --git a/python/python/lancedb/__init__.py b/python/python/lancedb/__init__.py index ac370d148..c169633c4 100644 --- a/python/python/lancedb/__init__.py +++ b/python/python/lancedb/__init__.py @@ -94,7 +94,6 @@ def connect( host_override: str, optional The override url for LanceDB Cloud. read_consistency_interval: timedelta, default None - (For LanceDB OSS only) The interval at which to check for updates to the table from other processes. If None, then consistency is not checked. For performance reasons, this is the default. For strong consistency, set this to @@ -104,6 +103,10 @@ def connect( the last check, then the table will be checked for updates. Note: this consistency only applies to read operations. Write operations are always consistent. + + Stronger consistency is not free. The smaller the interval, the more + often each read pays the cost of checking for updates against object + storage, raising per-read latency and cost. client_config: ClientConfig or dict, optional Configuration options for the LanceDB Cloud HTTP client. If a dict, then the keys are the attributes of the ClientConfig class. If None, then the @@ -344,7 +347,6 @@ async def connect_async( host_override: str, optional The override url for LanceDB Cloud. read_consistency_interval: timedelta, default None - (For LanceDB OSS only) The interval at which to check for updates to the table from other processes. If None, then consistency is not checked. For performance reasons, this is the default. For strong consistency, set this to @@ -354,6 +356,10 @@ async def connect_async( the last check, then the table will be checked for updates. Note: this consistency only applies to read operations. Write operations are always consistent. + + Stronger consistency is not free. The smaller the interval, the more + often each read pays the cost of checking for updates against object + storage, raising per-read latency and cost. client_config: ClientConfig or dict, optional Configuration options for the LanceDB Cloud HTTP client. If a dict, then the keys are the attributes of the ClientConfig class. If None, then the diff --git a/rust/lancedb/src/connection.rs b/rust/lancedb/src/connection.rs index 1b069eef8..c1d475c9c 100644 --- a/rust/lancedb/src/connection.rs +++ b/rust/lancedb/src/connection.rs @@ -824,9 +824,11 @@ impl ConnectBuilder { /// This only affects read operations. Write operations are always /// consistent. /// - /// For LanceDB Cloud and Enterprise, the interval is sent on every read as - /// an `x-lancedb-min-timestamp` freshness header so the server's cache - /// honors the same semantics. + /// # Cost + /// + /// Stronger consistency is not free. The smaller the interval, the more + /// often each read pays the cost of checking for updates against object + /// storage, raising per-read latency and cost. pub fn read_consistency_interval( mut self, read_consistency_interval: std::time::Duration,