Add --rebuild-index-strategy to qlever start - #314
Conversation
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.
There was a problem hiding this comment.
🟡 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_strategyas a server argument inQleverfileparsing / CLI help. - Forward
--rebuild-index-strategyfromqlever startto the server when the value is notmanual. - 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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…n is the style of these command strings
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 startaccepts the option (also settable viaREBUILD_INDEX_STRATEGYin the[server]section of theQleverfile) and forwards it to the server:manual(the default) orautomatic:min:max:fraction, where a rebuild is triggered automatically in the background once the number of delta triples reaches the givenfractionof the number of index triples, but never belowminand always atmax(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.