Skip to content

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

Merged
egolearner merged 3 commits into
alibaba:mainfrom
egolearner:fix/ddl-writing-segment-consistency
Jul 16, 2026
Merged

fix(collection): preserve writing segment on DDL failure#574
egolearner merged 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
@egolearner egolearner requested a review from feihongxu0824 July 14, 2026 12:13

@feihongxu0824 feihongxu0824 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@egolearner egolearner merged commit 23538ab into alibaba:main Jul 16, 2026
13 checks passed
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

2 participants