cloudnative-pg / cloudnative-pg/plugin-barman-cloud
[BUG]: Restore breaks when increasing wal.maxParallel to 8.
- Ngôn ngữ chính
- Go
- Star
- 191
- Fork
- 72
- Merge trung bình
- 1 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 18
Mô tả
**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.
[plugin_barman_cloud.log](https://github.com/user-attachments/files/22270128/plugin_barman_cloud.log)
**Expectation**
Restore works independently of the maxParallel setting.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện quá trình khôi phục với các cấu hình ObjectStore và Cluster được cung cấp, sau đó kiểm tra log sidecar của plugin-barman-cloud xung quanh lỗi "end of wal reached". Theo dõi cách xử lý wal.maxParallel trong đường dẫn khôi phục và so sánh hành vi ở 1 và 8; công việc được xem là hoàn tất khi quá trình khôi phục bản sao lưu thành công независимо với thiết lập đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- go, kubernetes, postgresql
- Lĩnh vực
- databases, infrastructure
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 50/100