{{ message }}
Repository navigation
Commit 73836fe
feat: pass the check_empty_wal_archive decision to plugins
The empty-WAL-archive check depends on the Cluster's annotation and,
for archiving, on a first-archive marker file whose lifecycle the
operator owns. A plugin re-deriving this decision on its own (e.g. by
reading the annotation directly) duplicates policy that belongs here.
Compute the decision once and pass it explicitly to plugins through
cnpg-i's new CheckEmptyWalArchive field, for both WAL archiving and
the restore job hooks. The in-tree archiving path is refactored to
share the same composition rule via shouldCheckEmptyWalArchive,
instead of computing it twice.
Closes #11217
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>1 parent ad1d52c commit 73836fe
4 files changed
Lines changed: 39 additions & 13 deletions
File tree
- internal/cnpi/plugin/client
- pkg/management/postgres/archiver
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
62 | 65 | | |
63 | 66 | | |
64 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
65 | 74 | | |
66 | | - | |
| 75 | + | |
| 76 | + | |
67 | 77 | | |
68 | 78 | | |
69 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | | - | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
67 | | - | |
68 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
| |||

0 commit comments