Skip to content

fix(collection): preserve writing segment on DDL failure#574

Open
egolearner wants to merge 3 commits into
alibaba:mainfrom
egolearner:fix/ddl-writing-segment-consistency
Open

fix(collection): preserve writing segment on DDL failure#574
egolearner wants to merge 3 commits into
alibaba:mainfrom
egolearner:fix/ddl-writing-segment-consistency

Conversation

@egolearner

Copy link
Copy Markdown
Collaborator

Summary

  • Keep the live writing segment unchanged while CreateIndex/DropIndex persisted-segment tasks are still running.
  • Switch non-empty writing segments under the old schema before DDL task execution.
  • Create the new-schema writing segment only after DDL tasks succeed, and make it live only after the new manifest is flushed.
  • Add Python regression coverage for FTS and inverted drop_index reopen consistency.

Closes #573

Tests

  • ninja -C build.release _zvec
  • build.release/bin/collection_test --gtest_filter="CollectionTest.Feature_DropAndRecreateScalarIndex*:CreateIndex:DropIndex"
  • python -m pytest -o addopts="" python/tests/detail/test_collection_ddl.py::TestIndexDDL::test_drop_index_reopen_after_persisted_task_result -q

@egolearner egolearner requested review from Cuiyus and zhourrr as code owners July 9, 2026 02:56
@egolearner egolearner changed the title Fix DDL writing segment consistency on failure fix(collection): preserve writing segment on DDL failure Jul 9, 2026
@egolearner egolearner force-pushed the fix/ddl-writing-segment-consistency branch from a21b7ce to 52ac67f Compare July 9, 2026 05:56
@egolearner egolearner force-pushed the fix/ddl-writing-segment-consistency branch from 5fc598f to 86f4e2e Compare July 10, 2026 03:46
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.

Bug: failed DDL can rewrite live writing segment before manifest commit

1 participant