Skip to content

connection: expose simple connect settings and read consistency - #152

Merged
Xuanwo merged 6 commits into
mainfrom
xuanwo/c124-connect-settings
Nov 22, 2026
Merged

Xuanwo merged 6 commits into
mainfrom
xuanwo/c124-connect-settings

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Nov 22, 2026

Copy link
Copy Markdown
Member

Adds the simple existing ConnectBuilder setters for this #124 slice:

  • API key, region, REST host override, and SQL host override
  • Read consistency interval in milliseconds: unset keeps the SDK manual default, 0 selects strong consistency, and a positive value selects eventual consistency
  • Namespace client property and manifest-enabled mode
  • lancedb_connection_read_consistency introspection backed by Connection::read_consistency

The new C result type distinguishes manual, strong, and eventual modes and reports the eventual interval in whole milliseconds. On failure, the output is unchanged; remote Enterprise connections surface the SDK's NotSupported result.

This slice does not add bulk HTTP ClientConfig, connect_namespace, AWS credential/provider changes, or create/open options. Existing builder setters and entry points keep their contracts.

Validation on the exact head: cargo check --locked, strict Clippy, host and MSVC LLP64 ABI checks (184 functions, 32 structs, 8 enums), strict C17 source-header compilation, and the connection CTest under Valgrind plus the C17 consumer. The C++ tests cover unset, zero, positive, invalid strings, manifest-enabled local connections, and remote SDK rejection/NotSupported paths without contacting a backend.

Refs #124. The issue remains open for the remaining connection slices.

Add consuming ConnectBuilder setters for the SDK API key, region, host
and SQL host overrides, namespace client properties, manifest mode,
and a millisecond read consistency interval. Expose the SDK read
consistency through a typed C result that distinguishes manual,
strong, and eventual modes.

Extend the C++ and C17 consumers to cover unset, zero, positive and
invalid inputs. Remote enterprise connections are checked for the
SDK's NotSupported read-consistency result and configuration
rejections without contacting a backend.

Refs #124
Store the SDK remote dispatch classification on the opaque connect
builder and gate the dedicated remote setters on it. A native connection
no longer receives the API key, region, or host overrides through its
native storage options map.

Use the SDK's db-prefix dispatch so malformed remote URIs still reach
SDK validation. Extend the consumers with native secret absence, valid
db:// root forwarding, and malformed URI error checks. Correct the
region, SQL host, and read consistency documentation for native and
remote behavior.

Refs #124
Keep all four public C setters available in no-default builds. The
remote SDK method binding is selected by the C crate's remote feature;
without it, the setters still consume and validate their inputs and
return the builder, while execution keeps the SDK's remote-disabled
error path.

Correct the native background-refresh and remote pinned-snapshot
documentation, and gate the remote-only Rust probes so native and
no-remote contracts remain testable.

Refs #124
@Xuanwo
Xuanwo merged commit c8e2671 into main Nov 22, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant