Skip to content

Validate the index after rebuild-index#287

Open
hannahbast wants to merge 7 commits intomainfrom
rebuild-index-validate
Open

Validate the index after rebuild-index#287
hannahbast wants to merge 7 commits intomainfrom
rebuild-index-validate

Conversation

@hannahbast
Copy link
Copy Markdown
Collaborator

When the API call cmd=rebuild-index to QLever succeeds, this does not necessarily mean that the index is valid. This could lead to a situation where the old index was replaced with an invalid new index.

With this change, the new index is validated before moving it to a new location or deleting the old index. The index is validated by starting a server with that index on a random free port and issuing a simple query to it. Only if the validation succeeds, does the command continue as before.

On the side, change the name of the option --keep-old-index-dirs to --keep-previous-index-dirs, which now has the options all, none, original-only, most-recent-only, and original-and-most-recent, where the latter is the new default.

Hannah Bast added 6 commits May 3, 2026 21:19
When the API call `cmd=rebuild-index` to QLever succeeds, this does not
necessarily mean that the index is valid. This could lead to a situation
where the old index was replaced with an invalid new index.

With this change, the new index is validated before moving it to a new
location or deleting the old index. The index is validated by starting a
server with that index on a random free port and issuing a simple query
to it. Only if the validation succeeds, does the command continue as
before.

On the side, change the name of the option `--keep-old-index-dirs` to
`--keep-previous-index-dirs`, which now has the options `all`, `none`,
`original-only`, `most-recent-only`, and `original-and-most-recent`,
where the latter is the new default.
Copilot AI review requested due to automatic review settings May 6, 2026 17:06
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.

1 participant