Split modules and shard EvaluationSession state#26
Open
hardbyte wants to merge 3 commits into
Open
Conversation
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
src/lib.rsinto private implementation modules with root-level reexports, preserving the existinguse gatehouse::{...}API shape.EvaluationSessioninternals from global source/cache/in-flight maps into per-fact-typeFactState<K>with striped cache and in-flight state.FactSource::load_many()outside locks and preserves the cancellation invariant: cancelled loaders cacheLoaderCancelledand wake waiters.Addresses #21.
Addresses #25.
Notes
This PR is stacked on
brian/bulk-authz-batchbecause both issues depend on the v0.3EvaluationSession/FactSourcework in PR #18. Issue #21's proposedLookup*module contents are not present because PR #18 removed the unconsumed lookup draft; no lookup API is introduced here.Validation
cargo fmt --all --checkcargo buildcargo clippy --all-targets --all-features -- -D warningscargo doc --all-features --no-depscargo test --doccargo test --all-targets --all-featurescargo bench --bench permission_checker --no-runcargo check --example axumcargo check --example pg18_bulk_rebaccargo run --example in_ram_rebacDATABASE_URL="host=localhost port=15432 user=postgres password=test dbname=awa_test" cargo run --example pg18_bulk_rebac --releasePG18 release example completed against local PostgreSQL 18.3; largest row:
10000,8000,807.565,11.745,6000,x68.8.