Skip to content

Make read_consistency_interval behavior aligned between OSS and Remote #3370

Description

@wjones127

There is inconsistency in the handling of the consistency interval and related functions between OSS and Remote:

Behavior OSS Remote
checkout_latest() Loads the latest version of the table Just drops the version pin, server might still provide older table version
checkout_version() Fixes the table version to given version Same
read_consistency_interval=None Never checks for updates, except when explicitly asked Ignored
read_consistency_interval=0 Check for update on every request Ignored
read_consistency_interval=5s Check for update at least every 5s Ignored

We'd like to bring this into alignment.

Proposal

Add server support for two headers:

  1. LanceDB-Min-Version: minimum table version to provide. This is used to guarantee we are reading data newer than what we've written.
  2. LanceDB-Min-Timestamp: minimum table version created at to use. This is for situations like checkout_latest() where we just want to specify at a given time, but don't know what the particular version is.

Then we can make Remote match the OSS behavior by:

  • In checkout_latest() save the current timestamp and pass it in LanceDB-Min-Timestamp in subsequent calls.
  • For read_consistency_interval=0, always pass LanceDB-Min-Timestamp with the current timestamp
  • For read_consistency_interval=5s, keep passing an increasing timestamp in LanceDB-Min-Timestamp

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions