Retention policy only prunes the current `serverName`; archives of earlier lineages are never cleaned up

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go, postgresql
領域
databases

調査の方向性

Start by reading retention.md and tracing how ObjectStore.status reports lineages and how retention runs select a serverName. The issue’s documentation requirement is directly actionable; the proposed opt-in also needs rules for identifying referenced lineages and deciding when their newest WAL or backup is outside the window. Done when the per-lineage behavior and safety condition are documented, or the opt-in is implemented with tests confirming active lineages are retained and inactive expired ones are pruned.

索引モデルが issue の本文から書いたものです。

説明

Problem
The recommended recovery pattern restores from the old serverName and archives to a new one, because the plugin refuses to archive into a non-empty folder. After each recovery, the ObjectStore therefore holds several lineages:

s3://bucket/cluster-a/      (original)
s3://bucket/cluster-a-dr1/  (after recovery 1)
s3://bucket/cluster-a-dr2/  (after recovery 2, current)

The retention run (barman-cloud-backup-delete --retention-policy "RECOVERY WINDOW OF 7 DAYS" s3://bucket/ <serverName>) only covers the cluster's current serverName. The earlier lineages are never pruned and grow without bound unless someone deletes them by hand. ObjectStore.status lists all lineages with their recovery windows, so the plugin already knows about them.

Versions: plugin-barman-cloud v0.16.0, CloudNativePG 1.30.2.

Expected
At least, retention.md should state that the policy is applied per serverName and covers only the lineage a cluster currently archives to, so that operators plan cleanup of old lineages.

Better, an opt-in on the ObjectStore, for example:

spec:
  retentionPolicy: "7d"
  pruneInactiveServerNames: true   # apply the window to lineages no cluster archives to anymore

A lineage would be deleted once its newest WAL/backup is older than the window, and never while a cluster still references it.

Related: #827 (docs on serverName separation), #1163, #405.

主要言語
Go
スター
214
フォーク
91
平均マージ
2日 11時間
マージ済み PR(30日)
38

環境構築

はじめの一歩

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

cloudnative-pg/plugin-barman-cloud のほかの issue

cloudnative-pg/plugin-barman-cloud の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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