Skip to content

Commit

Permalink
Log short context timeout for long poll GetWorkflowExecutionHistory (c…
Browse files Browse the repository at this point in the history
  • Loading branch information
yycptt authored Dec 3, 2020
1 parent a6edb24 commit 3e5100f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions service/frontend/workflowHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1963,6 +1963,16 @@ func (wh *WorkflowHandler) GetWorkflowExecutionHistory(

// we need to update the current next event ID and whether workflow is running
if len(token.PersistenceToken) == 0 && isLongPoll && token.IsWorkflowRunning {
logger := wh.GetLogger().WithTags(
tag.WorkflowDomainName(getRequest.GetDomain()),
tag.WorkflowID(getRequest.Execution.GetWorkflowId()),
tag.WorkflowRunID(getRequest.Execution.GetRunId()),
)
// TODO: for now we only log the invalid timeout (this is done inside the helper function) in case
// this change breaks existing customers. Once we are sure no one is calling this API with very short timeout
// we can return the error.
_ = common.ValidateLongPollContextTimeout(ctx, "GetWorkflowExecutionHistory", logger)

if !isCloseEventOnly {
queryNextEventID = token.NextEventID
}
Expand Down

0 comments on commit 3e5100f

Please sign in to comment.