cloudnative-pg / cloudnative-pg/plugin-barman-cloud
[BUG]: Restore breaks when increasing wal.maxParallel to 8.
还没有人认领这个 Issue。
- 主要语言
- Go
- 星标
- 192
- 派生
- 75
- 平均合并
- 1 天 16 小时
- 30 天内合并 PR
- 18
描述
Environment
Kubernetes 1.32
CNPG Version: 1.26.1
Plugin Barman Cloud Version: 0.6.0
Observation:
We verify our CNPG Backups nightly by restoring them. Thats when we noticed that most backups can not be restored. When decreasing wal.maxParallel from 8 to 1 in the objectstore it works as expected again. Even previously failed attempts to verify a backup work again.
Sample objectstore configuration:
apiVersion: barmancloud.cnpg.io/v1
kind: ObjectStore
metadata:
name: fah-db-backup
namespace: kimi
spec:
configuration:
data:
compression: gzip
destinationPath: s3://XXX/db
endpointURL: https://s3.eu-central-1.ionoscloud.com
historyTags:
backupRetentionPolicy: keep
s3Credentials:
accessKeyId:
key: accessKey
name: kimi-s3-backup
secretAccessKey:
key: secretKey
name: kimi-s3-backup
tags:
backupRetentionPolicy: expire
wal:
compression: gzip
maxParallel: 1
instanceSidecarConfiguration:
env:
- name: AWS_REQUEST_CHECKSUM_CALCULATION
value: when_required
- name: AWS_RESPONSE_CHECKSUM_VALIDATION
value: when_required
retentionPolicyIntervalSeconds: 1800
retentionPolicy: 30d
Here an example of trying to restore a backup:
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
labels:
cnpg-backup-verification: "true"
original-cluster: fah-db
name: fah-db-verify-post-barman
namespace: kimi
spec:
storage:
size: 10Gi
bootstrap:
recovery:
database: kf-fah
owner: kf-fah
secret:
name: fah-db-owner-secret
source: fah-db
env:
- name: AWS_REQUEST_CHECKSUM_CALCULATION
value: when_required
- name: AWS_RESPONSE_CHECKSUM_VALIDATION
value: when_required
externalClusters:
- name: fah-db
plugin:
enabled: true
isWALArchiver: false
name: barman-cloud.cloudnative-pg.io
parameters:
barmanObjectName: fah-db-backup
serverName: fah-db
Attached is the complete log of the plugin-barman-cloud sidecar in the CNPG full-recovery job. The critical problem seems to be "end of wal reached" which occurs when restoring with maxParallel 8 but not with maxParallel 1.
Expectation
Restore works independently of the maxParallel setting.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先使用提供的 ObjectStore 和 Cluster 配置复现恢复,然后检查 plugin-barman-cloud sidecar 日志中 "end of wal reached" 错误附近的内容。跟踪恢复路径对 wal.maxParallel 的处理,并比较设置为 1 和 8 时的行为;当备份恢复不受该设置影响且能够成功时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- go, kubernetes, postgresql
- 领域
- databases, infrastructure
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 50/100