Skip to content

Commit

Permalink
feat: support cluster upgrade from cd/cv to cmpd/cmpv (#8584)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuriwuyun authored Dec 5, 2024
1 parent de1888a commit 9ffd0c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions controllers/apps/transformer_cluster_component.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ func copyAndMergeComponent(oldCompObj, newCompObj *appsv1alpha1.Component) *apps
compObjCopy.Spec.OfflineInstances = compProto.Spec.OfflineInstances
compObjCopy.Spec.RuntimeClassName = compProto.Spec.RuntimeClassName
compObjCopy.Spec.DisableExporter = compProto.Spec.DisableExporter
compObjCopy.Spec.SystemAccounts = compProto.Spec.SystemAccounts
compObjCopy.Spec.Stop = compProto.Spec.Stop

if reflect.DeepEqual(oldCompObj.Annotations, compObjCopy.Annotations) &&
Expand Down
7 changes: 5 additions & 2 deletions pkg/lorry/engines/mysql/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,11 @@ func (mgr *Manager) IsDBStartupReady() bool {
// test if db is ready to connect or not
err := mgr.DB.PingContext(ctx)
if err != nil {
mgr.Logger.Info("DB is not ready", "error", err)
return false
var driverErr *mysql.MySQLError
if !errors.As(err, &driverErr) {
mgr.Logger.Info("DB is not ready", "error", err)
return false
}
}

mgr.DBStartupReady = true
Expand Down

0 comments on commit 9ffd0c3

Please sign in to comment.