improvement(knowledge): walk connector reconciliation by id so seen stamps stay off the index - #8334
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
All reported issues were addressed across 16 files
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Fix all with cubic | Re-trigger cubic
|
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 17 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 17 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
735f70d to
cdd6e8c
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 18 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
…tamps stay off the index
cdd6e8c to
9b2d1d8
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 18 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
Summary
document.source_seen_aton every listed document.source_seen_atis a key column ofdoc_connector_reconciliation_idx, so every stamp was a non-HOT update that wrote every index ondocument. This is release A of two: move every reader off that key so release B can drop it and the stamps become HOTdoc_connector_reconciliation_v2_idx (connector_id, id)with the same partial predicate, built concurrently. The old index stays until release B(seen, id), with absence as a plain filter. Each window is built by a recursive keyset walk that fetches one row per step (id > previous ORDER BY id LIMIT 1) up to 5,000 ids, so every statement reads at most one window whatever plan the database picks. A singleORDER BY id LIMITcould be planned as a bitmap read of the whole connector plus a sort. Matches are filtered within the window, so cost is bounded by ids scanned, not matches found. A walk whose absence count is zero is skippedstaleSeen), so current rows aren't rewritten and a later stamp is never overwritten by an earlier oneType of Change
Testing
lib/knowledgeunit tests, type-check, lint,check:audits, andcheck:migrations origin/stagingdoc_connector_reconciliation_idxconcurrently and add a HOT-update regression testChecklist