@@ -260,7 +260,8 @@ func (cp *CommandPlugin) monitorSubscribeChannel(ctx context.Context) {
260260 if cp .commandServerType != model .Command {
261261 slog .WarnContext (newCtx , "Auxiliary command server can not perform config apply" ,
262262 "command_server_type" , cp .commandServerType .String ())
263- cp .handleInvalidRequest (newCtx , message , "Config apply failed" )
263+ cp .handleInvalidRequest (newCtx , message , "Config apply failed" ,
264+ message .GetConfigApplyRequest ().GetOverview ().GetConfigVersion ().GetInstanceId ())
264265
265266 return
266267 }
@@ -273,7 +274,8 @@ func (cp *CommandPlugin) monitorSubscribeChannel(ctx context.Context) {
273274 if cp .commandServerType != model .Command {
274275 slog .WarnContext (newCtx , "Auxiliary command server can not perform api action" ,
275276 "command_server_type" , cp .commandServerType .String ())
276- cp .handleInvalidRequest (newCtx , message , "API action failed" )
277+ cp .handleInvalidRequest (newCtx , message , "API action failed" ,
278+ message .GetActionRequest ().GetInstanceId ())
277279
278280 return
279281 }
@@ -366,7 +368,7 @@ func (cp *CommandPlugin) handleHealthRequest(newCtx context.Context) {
366368}
367369
368370func (cp * CommandPlugin ) handleInvalidRequest (ctx context.Context ,
369- request * mpi.ManagementPlaneRequest , message string ,
371+ request * mpi.ManagementPlaneRequest , message , instanceID string ,
370372) {
371373 err := cp .commandService .SendDataPlaneResponse (ctx , & mpi.DataPlaneResponse {
372374 MessageMeta : request .GetMessageMeta (),
@@ -375,7 +377,7 @@ func (cp *CommandPlugin) handleInvalidRequest(ctx context.Context,
375377 Message : message ,
376378 Error : "Can not perform write action as auxiliary command server" ,
377379 },
378- InstanceId : request . GetActionRequest (). GetInstanceId () ,
380+ InstanceId : instanceID ,
379381 })
380382 if err != nil {
381383 slog .ErrorContext (ctx , "Unable to send data plane response" , "error" , err )
0 commit comments