Sort submissions by metadata count - #164
Conversation
There was a problem hiding this comment.
Pull request overview
Moves PreferDistinct selection from chunk scans to metadata-ranked submission selection with indexed chunk lookup.
Changes:
- Ranks submissions using reservation metadata exposed through SQLite FFI.
- Adds submission random-order indexing and simplifies metastate tracking.
- Adds fairness and reservation-filtering tests.
Reviewed changes
Copilot reviewed 12 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
workspace-hack/Cargo.toml |
Updates generated dependency features. |
opsqueue/src/consumer/strategy.rs |
Reworks strategy query generation. |
opsqueue/src/consumer/dispatcher/reserver.rs |
Exposes reservation lookup. |
opsqueue/src/consumer/dispatcher/mod.rs |
Registers SQLite FFI callbacks. |
opsqueue/src/consumer/dispatcher/metastate.rs |
Simplifies counts and adds JSON export. |
opsqueue/src/common/submission.rs |
Reuses one SQL parameter. |
opsqueue/src/common/chunk.rs |
Adds signed chunk-index conversion. |
opsqueue/migrations/20260803133844_add_random_order_index_to_submissions.up.sql |
Adds submission random ordering. |
opsqueue/migrations/20260803133844_add_random_order_index_to_submissions.down.sql |
Reverts submission random ordering. |
opsqueue/Cargo.toml |
Adds SQLite FFI dependency. |
libs/opsqueue_python/tests/test_roundtrip.py |
Tests PreferDistinct fairness. |
Cargo.toml |
Defines the workspace SQLite dependency. |
Cargo.lock |
Updates resolved dependencies. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
525fbdf to
4887d3d
Compare
|
There are some CI failures but the changes in the last fixup don't explain the errors on CI... Are they introduced with the rebase? |
Somehow I had incorrectly generated the DB migrations. Re-generated |
ReinierMaas
left a comment
There was a problem hiding this comment.
I still have to review: opsqueue/src/consumer/strategy.rs
ReinierMaas
left a comment
There was a problem hiding this comment.
LGTM! I left some more changes but I think that covers all.
Thanks for the comprehensive review! Educational :) Comments are addressed and merge conflicts resolved. Will deploy first thing in the morning. |
|
@OpsBotPrime merge and tag |
|
Failed to rebase, please rebase manually using |
fe09d4d to
adea587
Compare
|
@OpsBotPrime merge and tag |
Approved-by: jerbaroo Priority: Normal Auto-deploy: false
|
Rebased as 1aaa74d, waiting for CI … |
|
CI job 🟡 started. |
This PR makes changes to how the chunk selection query of the
PreferDistinctstrategy. In the Files changed tab, you can see the impact on the benchmark SVG .Key changes: