perf: cut over read paths to local projections#28
Merged
Conversation
Member
Author
|
Implementation-loop report:
|
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
Read endpoints were still doing write-style repository setup before returning data.
This change makes hot reads use the local repository projection that already exists in the shared database.
It also batches search group hydration and adds named timing steps to request logs, so production logs show which part of a read is slow.
What Changed
Reads now avoid GitHub mirror setup work unless they are actually mutating state.
Write paths still use
EnsureRepository, because writes may need to create or refresh the local projection.readRepositoryProjectionfor read-only repository lookup.repo_read,search_text_rows,mirror_batch_objects, andannotations_batch.Testing
The local gates pass with the existing coverage and lint thresholds unchanged.
Production verification will happen after merge and deploy.
npx --yes @simpledoc/simpledoc@0.1.6 checkgo vet ./...go test ./..../scripts/check-go-coverage.sh/home/bob/go/bin/golangci-lint run --timeout=5mgo run github.com/goreleaser/goreleaser/v2@latest checkgit diff --checkRisks
The intended behavior change is that read endpoints now require the repository projection to already exist locally.
That matches the unified database architecture: reads should not call ghreplica to bootstrap repository state.
Mutation paths still keep the old ensure behavior.