Files
b50db3004e test: e2e for schema-bump backfill over added-field function input and TEXT LOB (#52662)
### What problem
master e2e never covers two schema-bump additive intersections: (1) an
`add_function_field` whose input VARCHAR was itself added via
`add_collection_field` after the data was sealed (the exact crash shape
of issue #52159); (2) an `add_function_field` bump triggered while the
collection already holds a TEXT LOB column. Today
`test_add_function_field_feature.py` uses only create-time VARCHAR
inputs (no `add_collection_field`), and `test_milvus_client_text_lob.py`
has no `add_function_field` at all — the two concerns never meet.

### What this does
Add two pymilvus e2e cases into the existing files (reusing their
helpers, no new file):
- `test_add_bm25_function_field_on_backfilled_varchar_input`: seal rows
without the varchar, `add_collection_field(VARCHAR)`, then
`add_function_field` BM25 whose input is that added field. Asserts: old
rows read back null; sibling columns (code/vec) are byte-exact per row
against the inserted values; schema_version increments across both
bumps; null-input rows are never matched by BM25.
- `test_text_lob_add_function_field_bump_preserves_lob`: sealed TEXT LOB
rows in four states (external/inline/empty/null) plus an
`add_function_field` BM25 bump. Asserts: every `content` payload is
preserved byte-exact; sibling columns (tag/vector) stay intact per row;
a post-bump insert is still exact.

Add base helper `wait_for_schema_version_consistency`: gate bump
completion on the DataCoord-emitted `schema_version_consistent_segments
== schema_version_total_segments` stats (via `get_collection_stats`)
instead of a fixed sleep; combined with a `describe_collection`
schema_version increment assertion so the gate cannot pass on the
pre-bump state.

### Dependency / notes
- Depends on the master fix landing first: `pr: #52484` (issue #52159).
Until it merges,
`test_add_bm25_function_field_on_backfilled_varchar_input` reproduces a
`panic: no such field` on the datanode (exactly the regression this test
guards), so CI is expected RED — this is intended.
- Validated locally with a with-fix / without-fix two-arm comparison:
the without-fix binary reproduces the panic (RED), the with-fix binary
passes both tests (GREEN). External LOB goes through the `.vx` ref and
the bump uses REUSE_ALL (LOB path unchanged), both confirmed against
on-disk storage.
- Requires `dataCoord.compaction.bumpSchemaVersion.enabled: true`
(already set in the three e2e helm values).
- Related enhancement tracking: #51649.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


Also folds in a one-line repair of a stale L2 assertion (issue: #52878):
#52219 intentionally dropped the computed expected dim from the minhash
dim-mismatch message (overflow-safe division check), so the assertion no
longer expects the literal `512`.

Signed-off-by: MrPresent-Han <[email protected]>
Co-authored-by: MrPresent-Han <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>
2026-08-27 10:27:23 +08:00
..