Skip to content

Commit 51c7af4

Browse files
committed
Correct and enable the partionted log backup system
1 parent e5e9cf7 commit 51c7af4

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

e2e/test_operator_backups/operator_backup_test.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,26 @@ var _ = Describe("Operator Backup", Label("e2e", "pr"), func() {
125125
})
126126
})
127127

128-
PWhen("the partitioned backup system is used", func() {
128+
When("the partitioned backup system is used", func() {
129129
BeforeEach(func() {
130+
// Versions before 7.4 have a few issues and will not work properly with the experimental feature.
131+
requiredFdbVersion, err := fdbv1beta2.ParseFdbVersion("7.4.0")
132+
Expect(err).NotTo(HaveOccurred())
133+
134+
version := factory.GetFDBVersion()
135+
if !version.IsAtLeast(requiredFdbVersion) {
136+
Skip("version has a bug in the backup version that prevents tests to succeed")
137+
}
130138
log.Println("creating backup for cluster with partitioned log system")
131139
// Add additional backup workers to the cluster. Those will be used by the partitioned backup system.
132140
// The backup worker(not to be confused with the backup agent) will be used to back up the lof mutations.
133141
// We still need the backup agents to back up the key ranges.
134142
cluster := fdbCluster.GetCluster()
135143
spec := cluster.Spec.DeepCopy()
136-
spec.ProcessCounts.BackupWorker = 2
144+
processCounts, err := cluster.GetProcessCountsWithDefaults()
145+
Expect(err).NotTo(HaveOccurred())
146+
// We should create the same count of backup worker as we create log processes.
147+
spec.ProcessCounts.BackupWorker = processCounts.Log
137148

138149
// We take the spec from the general process class as the starting point.
139150
generalProcessSpec := spec.Processes[fdbv1beta2.ProcessClassGeneral]

0 commit comments

Comments
 (0)