Skip to content

Commit

Permalink
Allow omit rpc input/output for optimization (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
longquanzheng committed May 20, 2024
1 parent c6fb37c commit 7321d1f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions service/api/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,11 @@ func (s *serviceImpl) ApiV1WorkflowRpcPost(
RecordEvents: resp.RecordEvents,
InterStateChannelPublishing: resp.PublishToInterStateChannel,
}
if s.config.Api.OmitRpcInputOutputInHistory != nil && *s.config.Api.OmitRpcInputOutputInHistory {
// the input/output is only for debugging purpose but could be too expensive to store
sigVal.RpcInput = nil
sigVal.RpcOutput = nil
}
err := s.client.SignalWorkflow(ctx, req.GetWorkflowId(), req.GetWorkflowRunId(), service.ExecuteRpcSignalChannelName, sigVal)
if err != nil {
return nil, s.handleError(err, WorkflowRpcApiPath, req.GetWorkflowId())
Expand Down
3 changes: 3 additions & 0 deletions service/common/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ type (
MaxWaitSeconds int64 `yaml:"maxWaitSeconds"`
// OptimizedVersioning is the versioning optimization flag
OptimizedVersioning *bool `yaml:"optimizedVersioning"`
// omitRpcInputOutputInHistory is the flag to omit rpc input/output in history
// the input/output is only for debugging purpose but could be too expensive to store
OmitRpcInputOutputInHistory *bool `yaml:"omitRpcInputOutputInHistory"`
}

Interpreter struct {
Expand Down

0 comments on commit 7321d1f

Please sign in to comment.