Content cache keeps answering 404 after orphan cleanup removed the artifact
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start in AsyncContentCache.make_response(), where a cached ArtifactResponse is returned as a 404 without checking whether its artifact_pk still exists, then read the orphans/cleanup task to see how it deletes artifacts. Reproduce by fetching a wheel through a pull-through distribution, running orphan cleanup with protection time 0, and fetching again. Done when a cached entry whose artifact is gone is dropped and the request falls through to the handler, or the cleanup invalidates the cache, with a test covering it. The maintainers still need to choose between the two fixes.
索引モデルが issue の本文から書いたものです。
説明
Versions: pulpcore 3.118.1, CACHE_ENABLED = True, default CACHE_SETTINGS["EXPIRES_TTL"] = 600.
A pull-through file that is served (and cached as an ArtifactResponse, which stores artifact_pk) and then removed by orphans/cleanup with orphan_protection_time: 0 keeps being answered from the cache as 404 Not Found, X-PULP-CACHE: HIT, empty body, until the entry expires. Upstream still has the file; a cache miss would simply pull it through again.
Reproduce: fetch a wheel through a Python pull-through distribution that has no repository, run pulp orphan cleanup --protection-time 0, fetch the same URL again within ten minutes.
Suggested fix: in AsyncContentCache.make_response(), treat an ArtifactResponse entry whose artifact no longer exists as a bad entry (delete it and fall through to the handler) instead of returning the 404; and/or have the orphan cleanup task invalidate the content cache when it deletes artifacts.
Workaround we deployed: delete the cache hash of every distribution (Cache().delete(base_key=[...])) right after each orphan cleanup.
Related: https://github.com/pulp/pulp_python/issues/1428 (found while validating the workaround for that issue).
- 主要言語
- Python
- スター
- 606
- フォーク
- 174
- 平均マージ
- 16時間 44分
- マージ済み PR(30日)
- 107
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pulp/pulpcore のほかの issue
-
Issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Feature
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
pulp/pulpcore#5802 · コメント 10 件 ·
メンテナーはふだん 1 日以内に返信
-
Content app answers 404 instead of 502 when the remote of on-demand content is unavailable対応中かも @gigi206 が 1 日前に担当しました。 オープン
難易度 3/5 半日 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
Performance Task Triage-Needed
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
pulp/pulpcore#8206 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Issue Triage-Needed
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
[Bug]: Importing weave changes the process-wide locale対応中かも @himanshu748 が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
UX
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
mediajunkie/piper-morgan-product#2008 · コメント 2 件 ·