Repository navigation
test(storage-postgres): wait for the vector index hold release - #929
Open
LeeroyHannigan wants to merge 1 commit into
Open
LeeroyHannigan wants to merge 1 commit into
LeeroyHannigan wants to merge 1 commit into
Conversation
update_table_creates_a_vector_index_and_backfills_what_is_already_there polls the catalog until the new vector index is ACTIVE, then counts the index holds once. mark_active commits the ACTIVE flip on the catalog first and releases the hold afterwards, in a second statement on the data database. A count taken between the two statements finds the hold, and the test fails. The run-postgres-storage-tests job of #927 failed this way on 10 Nov. The test now polls the hold count for up to 10 s, as it polls the status. The order in mark_active stays as it is. A hold released before the flip would let the worker apply a write to an unpublished index.
LeeroyHannigan
requested review from
amrith,
c33howard,
eliseong,
hitesh96db,
jcshepherd,
navareamol,
pdf-amzn and
robinnsc
as code owners
November 10, 2026 14:42
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
update_table_creates_a_vector_index_and_backfills_what_is_already_thereincrates/storage-postgres/tests/vector_control_plane.rsnow waits up to 10 s for the build to release the vector index hold after the index shows ACTIVE. Before this change, it counted the holds once.Why
mark_activecommits the ACTIVE flip on the catalog first. It then releases the hold in a second statement on the data database. The test polled the catalog for ACTIVE and then counted the holds once, so a count between the two statements found the hold. Therun-postgres-storage-testsjob of #927 failed this way on 10 Nov, withleft: 1, right: 0atvector_control_plane.rs:964. The same tree passed that job an hour earlier.The order in
mark_activestays as it is. A hold released before the flip would let the worker apply a write to an unpublished index.There is no issue for this change.
Testing done
--release.left: 1, right: 0. A leaked hold still fails the test.rustfmt --check --edition 2024passes on the changed file.Checklist
cargo test --workspace)cargo fmt --check)cargo clippy -- -W clippy::pedantic)Storagetrait, auth model, on-diskformat, or public CLI surface, an RFC has been accepted or is linked
below. Otherwise, an ADR captures the decision (link below).
ADR / RFC: n/a
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.