From a3cd7fce6956c3cb680affd9400c0cf2fa18b436 Mon Sep 17 00:00:00 2001 From: Will Jones Date: Fri, 20 Feb 2026 16:01:15 -0800 Subject: [PATCH] fix: update DatasetConsistencyWrapper to accept same-version updates (#3055) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary `DatasetConsistencyWrapper::update()` only stored datasets with a strictly newer version. This caused `migrate_manifest_paths_v2` to silently drop its update since the migration renames files without bumping the dataset version. The subsequent `uses_v2_manifest_paths()` call would then return the stale cached dataset. Changed the version check from `>` to `>=` so same-version updates are accepted. ## Test plan - [x] Existing `test_create_table_v2_manifest_paths_async` Python test should pass - [x] Existing `should be able to migrate tables to the V2 manifest paths` NodeJS test should pass - [x] All dataset wrapper unit tests pass locally 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 --- .github/workflows/nodejs.yml | 1 + .github/workflows/python.yml | 1 + rust/lancedb/src/table/dataset.rs | 6 ++++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 6e121cc56..2dc07de15 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -8,6 +8,7 @@ on: paths: - Cargo.toml - nodejs/** + - rust/** - docs/src/js/** - .github/workflows/nodejs.yml - docker-compose.yml diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index b837a633f..50c8f4ec9 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -8,6 +8,7 @@ on: paths: - Cargo.toml - python/** + - rust/** - .github/workflows/python.yml concurrency: diff --git a/rust/lancedb/src/table/dataset.rs b/rust/lancedb/src/table/dataset.rs index 31cb7fa8f..9c4580891 100644 --- a/rust/lancedb/src/table/dataset.rs +++ b/rust/lancedb/src/table/dataset.rs @@ -109,7 +109,9 @@ impl DatasetConsistencyWrapper { /// Store a new dataset version after a write operation. /// - /// Only stores the dataset if its version is newer than the current one. + /// Only stores the dataset if its version is at least as new as the current one. + /// Same-version updates are accepted for operations like manifest path migration + /// that modify the dataset without creating a new version. /// If the wrapper has since transitioned to time-travel mode (e.g. via a /// concurrent [`as_time_travel`](Self::as_time_travel) call), the update /// is silently ignored — the write already committed to storage. @@ -121,7 +123,7 @@ impl DatasetConsistencyWrapper { // cached pointer. return; } - if dataset.manifest().version > state.dataset.manifest().version { + if dataset.manifest().version >= state.dataset.manifest().version { state.dataset = Arc::new(dataset); } drop(state);