Repository navigation
fix(audit-logs): list an organization's audit log through its single scope predicate again - #9438
Merged
Merged
Conversation
…scope predicate again #9419 read a listing's page ids as one keyset scan per organization workspace plus the organization-level rows. That bounds an unfiltered listing, but a filter the workspace keyset index cannot apply in order (an action, a resource, an actor) turns each workspace's scan into a bitmap AND of that workspace's whole history with the filter's index, then a sort, once per workspace. For a busy organization a filtered listing went from one scan of the filter's index to many times that, and slow replica reads are what recovery conflicts cancel. Restore the listing to the single organization-scope predicate it used before, which lets the planner pick the filter's index, keep the org-level index from 0444 (the predicate's organization-level rows can use it), and keep the scope integration test against the restored signature. The per-workspace plan test described the reverted shape and goes.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Medium impact] The PR appears safe to merge, with no actionable issues found. SummaryRestores organization audit-log listing and export to one scope predicate instead of separate workspace scans.
No actionable issues were found. This review checked code and tests without running the suites.
|
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restores the organization audit-log listing to its pre-#9419 single scope predicate.
buildOrgScopeConditionpredicate (as before perf(db): cut hot-path database work and close copilot cleanup gaps #9419); the org-level partial index from perf(audit-logs): index organization-level rows and read them as two keyset parts #9437 (0444) stays, since migrations are forward-only and the predicate's organization-level rows can use itlist-scope.integration.ts(mixed workspace, org-level, foreign and departed rows, sub-millisecond ties, byte budget) now runs against the restored signature; the per-workspace plan test described the reverted shape and is removedType of Change
Testing
bun run lint,type-check,check:audits,check-test-typesChecklist