change collector delay type
MODIFY
cmd/pitr/collector/collector.go
cmd/pitr/collector/collector.go
@@ -39,7 +39,7 @@ type Config struct {
S3BucketURL string `env:"S3_BUCKET_URL,required"`
S3Region string `env:"DEFAULT_REGION,required"`
BufferSize int64 `env:"BUFFER_SIZE"`
- CollectSpanSec int64 `env:"COLLECT_SPAN_SEC" envDefault:"60"`
+ CollectSpanSec float64 `env:"COLLECT_SPAN_SEC" envDefault:"60"`
}
const (

MODIFY
pkg/apis/pxc/v1/pxc_types.go
pkg/apis/pxc/v1/pxc_types.go
@@ -79,7 +79,7 @@ type PITRSpec struct {
Enabled bool `json:"enabled"`
StorageName string `json:"storageName"`
Resources *PodResources `json:"resources,omitempty"`
- TimeBetweenUploads int64 `json:"timeBetweenUploads,omitempty"`
+ TimeBetweenUploads float64 `json:"timeBetweenUploads,omitempty"`
}
type PXCScheduledBackupSchedule struct {

MODIFY
pkg/pxc/app/deployment/binlog-collector.go
pkg/pxc/app/deployment/binlog-collector.go
package deployment
import (
+ "fmt"
"strconv"
appsv1 "k8s.io/api/apps/v1"
@@ -17,7 +18,7 @@ func GetBinlogCollectorDeployment(cr *api.PerconaXtraDBCluster) (appsv1.Deployme
storage := cr.Spec.Backup.Storages[cr.Spec.Backup.PITR.StorageName]
binlogCollectorName := GetBinlogCollectorDeploymentName(cr)
pxcUser := "xtrabackup"
- sleepTime := strconv.FormatInt(cr.Spec.Backup.PITR.TimeBetweenUploads, 10)
+ sleepTime := fmt.Sprintf("%.2f", cr.Spec.Backup.PITR.TimeBetweenUploads)
bufferSize, err := getBufferSize(cr.Spec)
if err != nil {

change collector delay type