Skip to content

Add --rebuild-index-strategy to qlever start - #314

Merged
hannahbast merged 5 commits into
mainfrom
add-rebuild-index-strategy
Aug 3, 2026
Merged

Add --rebuild-index-strategy to qlever start#314
hannahbast merged 5 commits into
mainfrom
add-rebuild-index-strategy

Conversation

@hannahbast

@hannahbast hannahbast commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Companion to ad-freiburg/qlever#3163, which adds automatic index rebuilds to qlever-server, controlled by the new option --rebuild-index-strategy.

With this change, qlever start accepts the option (also settable via REBUILD_INDEX_STRATEGY in the [server] section of the Qleverfile) and forwards it to the server: manual (the default) or automatic:min:max:fraction, where a rebuild is triggered automatically in the background once the number of delta triples reaches the given fraction of the number of index triples, but never below min and always at max (e.g. 10000:1000000:0.1).

For the default value manual, the flag is not passed to the server at all, so that older server binaries without the option keep working.

Forwards the option of the same name to qlever-server: "manual" (the
default, in which case the flag is not passed, so that older server binaries
keep working) or a number, in which case the server automatically rebuilds
the index in the background whenever the number of delta triples exceeds
that number. Can also be set via REBUILD_INDEX_STRATEGY in the [server]
section of the Qleverfile.
Copilot AI review requested due to automatic review settings August 3, 2026 11:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Not ready to approve

The newly added --rebuild-index-strategy value is interpolated into a shell command without quoting, enabling shell injection/breakage when run_command(..., shell=True) executes it.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

This PR extends qlever start to accept the new server option --rebuild-index-strategy (configured via the Qleverfile) and forward it to qlever-server only when non-default, maintaining compatibility with older server binaries.

Changes:

  • Add rebuild_index_strategy as a server argument in Qleverfile parsing / CLI help.
  • Forward --rebuild-index-strategy from qlever start to the server when the value is not manual.
  • Update start-command tests to include the new argument in relevant-args lists and command construction expectations.
File summaries
File Description
test/qlever/commands/test_start_other_methods.py Updates expected relevant Qleverfile arguments for start.
test/qlever/commands/test_start_execute.py Extends command-construction and execution tests for the new flag.
src/qlever/qleverfile.py Adds --rebuild-index-strategy to the [server] argument set with default manual.
src/qlever/commands/start.py Conditionally appends --rebuild-index-strategy to the constructed server command line.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread src/qlever/commands/start.py
hannahbast and others added 3 commits August 3, 2026 14:43
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@hannahbast
hannahbast merged commit 2a48bff into main Aug 3, 2026
10 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.

2 participants