Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: sync instance on update (#7130)

Danny Xu9ca6b3fca96a
diff --git a/backend/api/v1/instance_service.go b/backend/api/v1/instance_service.go
index b3f069cb0f..c3b64028c4 100644
--- a/backend/api/v1/instance_service.go
+++ b/backend/api/v1/instance_service.go
@@ -225,7 +225,13 @@ func (s *InstanceService) UpdateInstance(ctx context.Context, request *v1pb.Upda
return nil, status.Errorf(codes.Internal, err.Error())
}
- // TODO(d): sync instance databases.
+ if _, err := s.schemaSyncer.SyncInstance(ctx, instance); err != nil {
+ log.Warn("Failed to sync instance",
+ zap.String("instance", instance.ResourceID),
+ zap.Error(err))
+ }
+ // Sync all databases in the instance asynchronously.
+ s.stateCfg.InstanceDatabaseSyncChan <- instance
return convertToInstance(ins), nil
}