Skip to content

Commit

Permalink
chore: remove some redundant comments
Browse files Browse the repository at this point in the history
  • Loading branch information
powerfooI committed Oct 11, 2023
1 parent 174a1df commit 2d01276
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion api/v1alpha1/obtenant_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ func (r *OBTenant) Default() {
if err != nil {
tenantlog.Error(err, "Failed to get cluster")
} else {
tenantlog.Info("Get cluster", "cluster", cluster)
r.SetOwnerReferences([]metav1.OwnerReference{{
APIVersion: cluster.APIVersion,
Kind: cluster.Kind,
Expand Down
3 changes: 0 additions & 3 deletions api/v1alpha1/obtenantoperation_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,11 @@ var _ webhook.Validator = &OBTenantOperation{}

// ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (r *OBTenantOperation) ValidateCreate() (admission.Warnings, error) {
obtenantoperationlog.Info("validate create", "name", r.Name)

return nil, r.validateMutation()
}

// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
func (r *OBTenantOperation) ValidateUpdate(old runtime.Object) (admission.Warnings, error) {
obtenantoperationlog.Info("validate update", "name", r.Name)
_ = old
return nil, r.validateMutation()
}
Expand Down
1 change: 0 additions & 1 deletion pkg/oceanbase/operation/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ func (m *OceanbaseOperationManager) GetServer(s *model.ServerInfo) (*model.OBSer
return nil, err
}
if len(observers) == 0 {
m.Logger.Info("observer not found", "server identity", s)
return nil, nil
}
return &observers[0], nil
Expand Down
4 changes: 0 additions & 4 deletions pkg/oceanbase/operation/tenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ func (m *OceanbaseOperationManager) AddUnitConfigV4(unitConfigV4 *model.UnitConf

func (m *OceanbaseOperationManager) SetTenantVariable(tenantName, variableList string) error {
preparedSQL, params := m.preparedSQLForSetTenantVariable(tenantName, variableList)
m.Logger.Info(fmt.Sprintf("sql: %s, parms: %v", preparedSQL, params))
err := m.ExecWithDefaultTimeout(preparedSQL, params...)
if err != nil {
return errors.Wrap(err, "Set Tenant Variable")
Expand All @@ -244,7 +243,6 @@ func (m *OceanbaseOperationManager) SetTenantVariable(tenantName, variableList s

func (m *OceanbaseOperationManager) SetUnitConfigV4(unitConfigV4 *model.UnitConfigV4SQLParam) error {
preparedSQL, params := preparedSQLForSetUnitConfigV4(unitConfigV4)
m.Logger.Info(fmt.Sprintf("sql: %s, parms: %v", preparedSQL, params))
err := m.ExecWithDefaultTimeout(preparedSQL, params...)
if err != nil {
return errors.Wrap(err, "Set UnitConfig")
Expand All @@ -254,7 +252,6 @@ func (m *OceanbaseOperationManager) SetUnitConfigV4(unitConfigV4 *model.UnitConf

func (m *OceanbaseOperationManager) SetTenantUnitNum(tenantName string, unitNum int) error {
preparedSQL, params := m.preparedSQLForSetTenantUnitNum(tenantName, unitNum)
m.Logger.Info(fmt.Sprintf("sql: %s, parms: %v", preparedSQL, params))
err := m.ExecWithDefaultTimeout(preparedSQL, params...)
if err != nil {
return errors.Wrap(err, "Set pool UnitNum")
Expand Down Expand Up @@ -436,7 +433,6 @@ func (m *OceanbaseOperationManager) AlterPool(poolParam *model.PoolParam) error
if sql != "" {
return m.ExecWithDefaultTimeout(sql, args...)
}
m.Logger.Info("Set pool need to execute nothing")
return nil
}

Expand Down
1 change: 0 additions & 1 deletion pkg/resource/obtenantbackuppolicy_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ func (m *ObTenantBackupPolicyManager) CheckAndSpawnJobs() error {
} else {
backupPath = m.getBackupDestPath(tenantRecordName)
}
m.Logger.Info("CheckAndSpawnJobs", "backupPath after split", backupPath)
// Avoid backup failure due to destination modification
latestFull, err := m.getLatestBackupJobOfTypeAndPath(constants.BackupJobTypeFull, backupPath)
if err != nil {
Expand Down

0 comments on commit 2d01276

Please sign in to comment.