cloudnative-pg / cloudnative-pg/plugin-barman-cloud

[Bug] Plugins are always used to archive WAL files if they have the capability

Đang mở
#797 1 bình luận 1 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Go
Star
191
Fork
72
Merge trung bình
2 ngày 21 giờ
Pull request đã merge (30 ngày)
21

Mô tả

`isWALArchiver` is ignored and [plugins are always used to archive WAL files](https://github.com/cloudnative-pg/cloudnative-pg/blob/3f2626d709c24ffdb3fb325e2fb09861d816467c/pkg/management/postgres/archiver/archiver.go#L298) if they have the capability to do it.

Given the following plugins stanza:

```yaml
plugins:
- name: barman-cloud.cloudnative-pg.io
enabled: true
isWALArchiver: false
parameters:
serverName: cnpg-default
barmanObjectName: cnpg-default-barman
```

You would expect WAL not to be archived using this plugin. However, there is no filtering in the [archiveWALViaPlugins](https://github.com/cloudnative-pg/cloudnative-pg/blob/3f2626d709c24ffdb3fb325e2fb09861d816467c/pkg/management/postgres/archiver/archiver.go#L277). It always archives with plugins that support WAL archiving.

The only cases where it won't archive WAL are:

1. if you specify a plugin as the WAL archiver and it doesn't have that capability.
2. you don't specify any plugins

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu trong pkg/management/postgres/archiver/archiver.go, đặc biệt là archiveWALViaPlugins và phần xử lý isWALArchiver. Tái hiện trường hợp YAML với isWALArchiver: false và xác minh rằng WAL không được lưu trữ thông qua plugin đó; hoàn thành khi thiết lập tường minh được tôn trọng, trong khi các plugin có khả năng vẫn có thể lưu trữ khi được bật.

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, postgresql
Lĩnh vực
backend, databases
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.