Skip to content

chore: cherry-pick fixes for v3.0.1 release#6217

Merged
westonpace merged 5 commits intorelease/v3.0from
release/v3.0.1
Mar 18, 2026
Merged

chore: cherry-pick fixes for v3.0.1 release#6217
westonpace merged 5 commits intorelease/v3.0from
release/v3.0.1

Conversation

@westonpace
Copy link
Copy Markdown
Member

@westonpace westonpace commented Mar 17, 2026

Summary

Cherry-picks bug fixes onto release/v3.0 for the v3.0.1 patch release:

Test plan

  • CI passes on cherry-picked commits (both PRs were already merged and tested on main)

wjones127 and others added 2 commits March 17, 2026 14:26
…6160)

Previously, `adjust_child_validity` would call `ArrayData::try_new` with
a null bitmap on a `DataType::Null` array, causing an `.unwrap()` panic
with `InvalidArgumentError("Arrays of type Null cannot contain a null
bitmask")`.

The trigger: when a user inserts rows where a struct sub-field has only
null values, Arrow infers `DataType::Null` for that column. If a
subsequent fragment omits that nullable sub-field, Lance inserts a
`NullReader` to fill it in. `MergeStream` then merges the real batch
(with null struct rows) and the `NullReader` batch (all-null struct),
recursing into the struct where `adjust_child_validity` is called with
the `Null`-typed child and a non-empty parent validity — triggering the
panic.

Fix: skip the bitmask operation when `child.data_type() ==
DataType::Null`. A `Null` array is always entirely null by definition
and needs no validity adjustment.

Closes #6159

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This fixes the reader panic in #6185 when a page keeps nullable rep/def
layer metadata but does not materialize any definition levels. The
decoder now treats that page-local state as all-valid and includes a
regression test that reproduces the mixed-page case before the fix.

Closes #6185.
@github-actions github-actions Bot added the chore label Mar 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor

PR Review

Clean cherry-pick of two targeted bug fixes for the v3.0.1 patch release. Both fixes are well-scoped and well-tested.

No issues found. Both fixes are correct:

  1. adjust_child_validity for DataType::Null — Arrow's Null type arrays cannot carry a null bitmap by design, so the early return is the right approach. The test reproduces the exact panic scenario (ENT-990) with a multi-fragment dataset scan.

  2. repdef nullable validity without def levels — When def_levels is None, the layer should be treated as all-valid regardless of the DefinitionInterpretation metadata. The fix correctly guards both is_all_valid(), skip_validity(), and unravel_validity() consistently.

Test coverage is thorough: unit tests at the Arrow and encoding layers, plus an end-to-end dataset test that exercises the full read path with schema evolution and null structs.

LGTM.

🤖 Generated with Claude Code

jmhsieh and others added 2 commits March 17, 2026 14:42
#6143)

Change conflict_retries from 0 to 5 in insert_into_manifest so that
cross-process races are handled correctly. When two processes
concurrently insert the same object_id, the second one hits a commit
version conflict. With conflict_retries > 0, MergeInsert retries by
re-evaluating the full plan against the latest data, where the join
detects the existing row and WhenMatched::Fail fires properly.

Previously, conflict_retries=0 meant the second operation would fail
with a generic TooMuchWriteContention error, but in some cases both
commits could succeed creating duplicate manifest entries ("Expected
exactly 1 table...found 2").

Add test with two independent ManifestNamespace instances racing on the
same directory to verify no duplicates are created.

Here's an example I run into occasionally
```
...
  File "/home/runner/work/geneva/geneva/src/geneva/state/manager.py", line 35, in __init__
    self.table = alter_or_create_table(
  File "/home/runner/work/geneva/geneva/src/geneva/utils/schema.py", line 138, in alter_or_create_table
    return db.create_table(table_name, schema=schema, namespace=namespace)
  File "/home/runner/work/geneva/geneva/src/geneva/db.py", line 403, in create_table
    return Table(self, name, namespace=namespace, storage_options=storage_options)
  File "/home/runner/work/geneva/geneva/src/geneva/table.py", line 489, in __init__
    self._ltbl  # noqa
  File "/home/runner/.local/share/uv/python/cpython-3.10-linux-x86_64-gnu/lib/python3.10/functools.py", line 981, in __get__
    val = self.func(instance)
  File "/home/runner/work/geneva/geneva/src/geneva/table.py", line 543, in _ltbl
    tbl = inner.open_table(self.name, namespace=self._namespace)
  File "/home/runner/work/geneva/geneva/.venv/lib/python3.10/site-packages/lancedb/namespace.py", line 392, in open_table
    response = self._ns.describe_table(request)
  File "/home/runner/work/geneva/geneva/.venv/lib/python3.10/site-packages/lance/namespace.py", line 362, in describe_table
    response_dict = self._inner.describe_table(request.model_dump())
OSError: LanceError(IO): Expected exactly 1 table with id 'default$geneva_manifests', found 2, /home/runner/work/lance/lance/rust/lance-namespace-impls/src/dir/manifest.rs:642:21
```

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This updates both transitive `lz4_flex` lines to their latest patch
releases so the lockfile no longer carries the yanked `0.11.5` release.
The `0.11.x` line comes from `tantivy`, and the `0.12.x` line comes from
the Arrow/Parquet/DataFusion stack.

Validated with `cargo check -p lance --locked`.
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

fix CI error: `FAILED
python/tests/test_integration.py::test_duckdb_pushdown_extension_types -
_duckdb.Error: DeprecationWarning: fetch_arrow_table() is deprecated,
use to_arrow_table() instead.`
@westonpace westonpace merged commit 8b69d38 into release/v3.0 Mar 18, 2026
58 checks passed
@westonpace westonpace deleted the release/v3.0.1 branch March 18, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants