Don't fail with ErrQueryWorkflowBeforeFirstDecision for consistent query
@@ -820,6 +820,7 @@ func (e *historyEngineImpl) QueryWorkflow(
}
}
+ if request.GetRequest().GetQueryConsistencyLevel() == querypb.QueryConsistencyLevel_Eventual {
// query cannot be processed unless at least one decision task has finished
// if first decision task has not finished wait for up to a second for it to complete
deadline := time.Now().Add(queryFirstDecisionTaskWaitTime)
@@ -835,6 +836,7 @@ func (e *historyEngineImpl) QueryWorkflow(
scope.IncCounter(metrics.QueryBeforeFirstDecisionCount)
return nil, ErrQueryWorkflowBeforeFirstDecision
}
+ }
de, err := e.shard.GetNamespaceCache().GetNamespaceByID(request.GetNamespaceId())
if err != nil {
