Repository navigation
Conversation
…vert-roles-20261126 # Conflicts: # db/sqlc/polling.sql.go
…vert-roles-20261126 # Conflicts: # db/polling_foreign_integration_test.go # internal/ingest/ingest.go
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.
Closes #356.
The old path read a full observer row and separately queried the claim. The ingest worker now fetches the two independent flags in one SQL statement. Existing public store methods remain available. The live event shape and all writes are preserved.
The regression counted two role reads before the change and one after it. Tests cover observer-only, claim-only, both, neither and a lookup error.
November 26 qualification
On a private restored PostgreSQL 16 database, both implementations agreed for 250 existing keys and four role combinations in a temporary fixture. Across seven alternating trials the median batch fell from 232.0 ms to 127.1 ms, with 500 queries reduced to 250. These are loopback results for the two role flags. Tested against dev
5fb32926f719at7be0c820d91c. CI · Preview handoffNovember 29 review
The query now matches the current upstream definition, including a foreign claim or foreign readings received within the last 24 hours. A PostgreSQL regression exposed the earlier lost foreign role and verified that expired readings stop marking an observer as a poller. On a fresh private restore, 249 real keys and eight fixtures produced identical flags. Seven alternating trials reduced queries per batch from 498 to 249 and median role-read time from 40.5 ms to 23.9 ms. This draft at
cc4f365ab3c5merges cleanly into dev0c1d7b7d0d84. The resulting files match both GitHub’s test-merge tree and the tested draft head. CI · Preview handoff