Repository navigation
Conversation
|
Thanks for the pull request, @rpenido! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Update the status of your PRYour PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
ff6c847 to
87e3982
Compare
87e3982 to
e885e12
Compare
e31d459 to
c5ab756
Compare
c5ab756 to
996095f
Compare
996095f to
4a27837
Compare
SearchQuery carries the text, one bounded page and the same exact filter expression delete() accepts, including id equality and IN lists. api.search() resolves the registration and delegates to Adapter.search(), which the Meilisearch adapter implements against the live index with q, offset, limit and the rendered filter. count_only sends limit 0 so the migrator can count without transferring a page; the estimated total is never reported as exact.
The shared hit count validation it also carried belongs to the Meilisearch adapter branch.
007598d to
be19dbb
Compare
be19dbb to
536a3ef
Compare
Description
Implements FAL-4413 on top of the write API in #32, the search API in #34 and the credential API in #35: the library rebuild lifecycle from ADR 0002 and the operator API.
The source yields
SourceBatch(unit, documents). The unit is copied onto each queuedWriteReceiptand into aWriteFailed, so a failure names the consumer batch even when the window holds several. The unit is a label, not a checkpoint; a crashed rebuild still restarts from the beginning.api.rebuildmints aRebuildTargetfrom the logical index, the schema version and a unique generation; acquires the per-use-case lease with one atomiccache.addin the cache selected byOPENEDX_SEARCH_CACHE_ALIAS(defaultdefault); callsbegin_rebuild; streams the source batches into the target; keeps up toOPENEDX_SEARCH_REBUILD_WINDOW(default 20) unconfirmed batches, checks them with the adapter'scheck_writes, refreshes the lease between batches, drains the window, checks that its generation is still the lease holder, and commits or aborts. A crash discards the target: the lease is not a checkpoint.While a same-version target is recorded,
upsertanddeletesubmit to the live index and the target; a target with a different schema version raisesSchemaVersionMismatchbefore the live write, so an old writer fails loudly instead of writing a stale shape.Adapter.check_writeschecks a batch of receipts in order; the default loopscheck_write, so this branch works with any adapter. The Meilisearch batch call (GET /tasks?uids=) and thecommit_rebuildwait for the target's pending tasks land with #33. ADR 0002 documents the bounded window andcheck_writes.The operator API is
indexes(), which returns anIndexStatusper registered use case with the logical index, schema version, backend and active rebuild target;reconcile(use_case), which creates missing indexes, applies the declared settings and returns the adapter'sReconcileResult; andrebuild(use_case, source). Consumers can wrap them in their own management command or task; this PR does not add Django commands. A read-only drift report remains FAL-4412.Testing instructions
uv run --group test pytest -q, and the linters withuv run tox -e quality.indexesandreconcile. The live engine check remains FAL-4410.Additional Information
Depends on:
Used by:
Private ref: FAL-4413