Repository navigation
Conversation
This branch has not been 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.
Incremental listing queries can scan a large name range for sparse results or sort too much recent history for an early page. This change selects page keys first and fetches payloads only for that page. Plain
updated_since&limit=100requests probe up to 513 matching keys in timestamp order: a complete set of at most 512 keys is sorted into public name/version order; larger sets use the name-ordered path. Other incremental shapes retain the 128-match boundary.For larger histories, bounded per-app strategy hints avoid repeating a probe that is likely to be discarded. One in 16 eligible requests can observe the probe result; up to 32 timestamp/name ranges are retained for five seconds, separately for deletion filtering. Hints contain no response rows. Every request still applies the complete predicate in one statement snapshot, so concurrent writes or stale hints can affect plan efficiency but cannot make results stale or omit matching rows. Transaction-owned reads and additional filters bypass hints. PostgreSQL checks cursor coverage behind a materialized guard, preserving generic-plan reuse. Sampled queries return one internal marker row, excluded from API results, pagination and row metrics.
SQL is constructed explicitly in named helpers; there are no prototype string replacements. Plain incremental page sizes 1 and 100 reuse prepared statements with the validated limit embedded and all request values bound. Other sizes/filters retain parameter-specific planning. No global planner, replica or connection-limit changes.
Migration 020 replaces the listing indexes with
(server_name, version, updated_at) INCLUDE (is_latest, status)and(updated_at DESC, server_name, version). It validates replacements before dropping old indexes transactionally. The deployment guide requires concurrent prebuilds on busy databases and documents recovery/application rollback.Validation for
5dbdbe8:The reviewed implementation stayed within 0.5% of the prototype in both cases. Small-history CPU stayed in the same range as 512; larger-history CPU was about 7.5% lower. Its worst read-group scheduled p99 was 5.78ms/3.16ms and publish p99 was 6.16ms/4.86ms for small/large history. These are short, local ARM VM measurements, not GKE capacity or latency predictions. Larger-history runs varied watermarks/cursor parameters; comparisons are within each history. Fixture resets used file-copy plus a completed checkpoint; all timed runs verified zero checkpoint writes. Autovacuum was disabled on the disposable fixture to control visibility. No production replay, gateway/cache, network or autoscaling layer was tested.
Keep in draft pending focused staging confirmation of the adaptive implementation. The preceding 512-only build
b888b8eimproved small-history staging behavior but regressed on larger history with 20 connections per app. This update addresses a measured local contributor; it does not establish that the entire staging regression is resolved or that 1,500 origin requests/s is comfortable on GKE. The probe bounds returned matches, not every index entry visited; stale hints may temporarily choose a slower scan, and the replacement indexes have storage/write costs.Production and staging were not accessed or changed for this update. Local containers/volume/network were removed and the benchmark VM was stopped with its original configuration restored. Raw data and benchmark evidence remain private.