Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Content cache keeps answering 404 after orphan cleanup removed the artifact

オープン
#8,214 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
28/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
backend

調査の方向性

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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pulp/pulpcore のほかの issue

pulp/pulpcore の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。