Reduce squashing version overhead of retain_repo_versions
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by reading how retain_repo_versions is enforced and how squashing updates RepositoryContent memberships and deletes repository versions; the issue does not name files, tests, or entry points. Compare batching squashes by count or time with the proposed inverted squashing strategy, then identify tests that cover version retention. Done means retention reaches the configured target without repeatedly doing work proportional to all past versions or growing without bound.
由索引模型根据 Issue 内容生成。
描述
Is your feature request related to a problem? Please describe
When a user only cares about a few repository versions it might want to set a low retain_repo_versions value, like 1, to keep only the latest repository version.
At each new version, this creates work to update all past version to point to the new one.
In repositories with a lot of contents, let's say 500k, this means at least updating 500k RepositoryContent membership instances and deleting the repository versions, which is a poor use of resources if repository is updated even mildly often.
Describe the solution you'd like
Introduce more efficient strategies for enforcing a desired retained versions target.
The idea is stating that the user don't care about the history, but it doesn't mind temporarily having more versions than his target number is, as long as it doesn't grow indefinitely and he doens't have to baby-sit the count.
A general approach for this is batch-squash multiple versions at once with a reasonable frequency (either by extra versions count, time-based, or whatever).
Describe alternatives you've considered
Not alternative, maybe complementary: invert the squashing logic.
Let's say $v_n$ is the latest version of a repository and $P$ are past versions, $P=\{v_0, ..., v_{n-1}\}$.
If we squash $P$ into $v_n$, that means we'll have $RC$ (RepositoryContent) updates proportial to $|P|$, as $RC$ represents $C$ (Content) membership with the $P$ set. If we define $N$ (new) as $N=\{v_1, ..., v_n\}$, and we squash $N$ into $v_0$, that gives $RC$ proportial updates with $|N|$, for all $c_k \in N$.
In general, repositories tends to grow with time and have $|\text{adds}| \gg |\text{removes}|$.
So assuming only adds, the $P$ will grow monotonically (to be fair, the count of $RC$ units), even after squashes (the new $P$ will be bigger than it ever was). $N$ in the other hand is effectively reset between these inverted squashes.
Additional context
None.
- 主要语言
- Python
- 星标
- 641
- 派生
- 178
- 平均合并
- 17 小时 36 分钟
- 30 天内合并 PR
- 76
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pulp/pulpcore 的其他 Issue
-
Content cache ignores the query string, so one path serves the response cached for another query未关闭Triage-Needed
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
Issue
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Feature
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
Creating a repository version from a large base_version uses excessive memory (can OOM the worker)可能已有人在做 @dkliban 今天认领。 未关闭Issue Triage-Needed
难度 4/5 3-5 天 新手友好度 18/100
维护者通常 1 天内回复
-
Feature Triage-Needed
难度 5/5 一周以上 新手友好度 25/100
维护者通常 1 天内回复
相似的 Issue
-
Triage-Needed
难度 2/5 1-3 小时 新手友好度 72/100
pulp/pulp-oci-images#875 ·
-
intake mcp-intake needs-human-review priority:high type:bug
难度 2/5 1-3 小时 新手友好度 66/100
Ikalus1988/MisakaNet#5718 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
facebookresearch/autoform-bot#872 ·
维护者通常 1 天内回复
-
Dataset.to_json() writes "Value": [] for an empty sequence可能已有人在做 @DG47 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
area: docs area: providers/oci priority: p3 size: S type: documentation
难度 2/5 1-3 小时 新手友好度 82/100
finos/open-resource-broker#933 ·
维护者通常 1 天内回复