Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: old connection of backup reconciler #92

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions pkg/controller/obtenantbackup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ type OBTenantBackupReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder record.EventRecorder

con *operation.OceanbaseOperationManager
}

//+kubebuilder:rbac:groups=oceanbase.oceanbase.com,resources=obtenantbackups,verbs=get;list;watch;create;update;patch;delete
Expand Down Expand Up @@ -259,9 +257,6 @@ func (r *OBTenantBackupReconciler) maintainRunningArchiveLogJob(ctx context.Cont
}

func (r *OBTenantBackupReconciler) getObOperationClient(ctx context.Context, job *v1alpha1.OBTenantBackup) (*operation.OceanbaseOperationManager, error) {
if r.con != nil {
return r.con, nil
}
var err error
logger := log.FromContext(ctx)
obcluster := &v1alpha1.OBCluster{}
Expand All @@ -276,6 +271,5 @@ func (r *OBTenantBackupReconciler) getObOperationClient(ctx context.Context, job
if err != nil {
return nil, errors.Wrap(err, "get oceanbase operation manager")
}
r.con = con
return con, nil
}