GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Count cached metadata against max_size and evict it LRU by pinguinfuss · Pull Request #507 · git-pkgs/proxy Conversation
Contributor
Fixes #461.
Tested live with max_size 5MB on SQLite and Postgres: floods of sumdb hash tiles and large npm packuments always went back to 5 MB after the next eviction pass. On main the same setup stayed over the limit. Not covered: storage can exceed the limit until the next pass (once a minute), and a metadata flood now evicts artifacts too.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…n drops whichever was used least recently, so metadata no longer piles up for good (git-pkgs#461). Metadata rows record when they were last served, an artifact not yet served counts from its download, and Arch stores a database blob again if eviction removed it under a refreshed row.
andrew
requested changes
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please address durable metadata cleanup, move the data backfill out of the schema migration, and surface the new eviction metric in analytics.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new metadata path deletes the metadata_cache row before deleting the blob, and queues cleanup only after a storage error. A process crash between the row deletion and this call leaves a blob with neither a cache row nor a pending-delete record, so it disappears from max_size accounting and cannot be reclaimed by the queue. Delete the metadata row and enqueue its storage path in one database transaction, then let cleanup remove the blob. Please cover interruption and retry behavior.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please keep this data backfill outside the schema migration. backfillMetadataLastAccessed loads every existing row into memory, then performs one UPDATE per row in a single transaction before startup can finish. Move it into bounded, resumable work and keep eviction safe while last_accessed_at is still NULL. Cover an upgrade with existing rows and an interrupted backfill.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new proxy_metadata_evicted_total metric is absent from /ui/analytics and metricSurface, contrary to CONTRIBUTING.md. TestEveryMetricIsSurfaced also does not instantiate this counter, so the normal test order hides the omission. Reproduced with
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…, and cover the new counter in the metric surface test. …ction, so a crash before the blob is deleted leaves it to reclaim instead of orphaning it. …0 instead of inside the migration, resuming after a restart, and until a row is backfilled eviction orders it by its write time. Uh oh!
There was an error while loading. Please reload this page.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Metadata cache never shrinks and isn't counted against max_sizeUh oh!
There was an error while loading. Please reload this page. 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. | ||||||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |