reindex numbered concurrent artifacts#1297
Merged
Merged
Conversation
81842e7 to
80d1f32
Compare
Postgres can leave invalid `_ccnew` and `_ccold` indexes after a failed concurrent reindex. When artifacts already existed and Postgres had to append digits to keep names unique, River only checked the unnumbered forms and could keep trying the same reindex, adding more large artifacts. Add a driver-level catalog lookup for artifacts belonging to a configured index. It matches the exact configured index name followed by `_ccnew` or `_ccold` with optional digits, returns the names for logging and cleanup, and lets stop-time cleanup drop the same numbered artifacts. SQLite keeps no-op semantics because it does not create concurrent reindex artifacts. Extend the maintenance and driver conformance coverage for numbered forms and near-miss names so similar user-created indexes are not treated as PostgreSQL artifacts. Make `riverdbtest.TestSchema`'s `DisableReuse` option use a fresh schema and avoid returning it to the idle pool, which keeps schema-mutating tests from leaking ad hoc indexes into later test cases. Document the user-facing fix in the changelog. Fixes #1296.
80d1f32 to
f5318c6
Compare
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.
Postgres can leave invalid
_ccnewand_ccoldindexes after a failed concurrent reindex. When artifacts already existed and Postgres had to append digits to keep names unique, River only checked the unnumbered forms and could keep trying the same reindex, adding more large artifacts.Add a driver-level catalog lookup for artifacts belonging to a configured index. It matches the exact configured index name followed by
_ccnewor_ccoldwith optional digits, returns the names for logging and cleanup, and lets stop-time cleanup drop the same numbered artifacts. SQLite keeps no-op semantics because it does not create concurrent reindex artifacts.Extend the maintenance and driver conformance coverage for numbered forms and near-miss names so similar user-created indexes are not treated as PostgreSQL artifacts. Document the user-facing fix in the changelog.
Fixes #1296.