File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
service/history/api/queryworkflow Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -343,9 +343,6 @@ func queryDirectlyThroughMatching(
343343 stickyStartTime := time .Now ().UTC ()
344344 matchingResp , err := rawMatchingClient .QueryWorkflow (stickyContext , stickyMatchingRequest )
345345 metrics .DirectQueryDispatchStickyLatency .With (metricsHandler ).Record (time .Since (stickyStartTime ))
346- if err != nil {
347- return nil , err
348- }
349346 cancel ()
350347 if err == nil {
351348 metrics .DirectQueryDispatchStickySuccessCount .With (metricsHandler ).Record (1 )
@@ -390,6 +387,9 @@ func queryDirectlyThroughMatching(
390387 nonStickyStartTime := time .Now ().UTC ()
391388 matchingResp , err := matchingClient .QueryWorkflow (ctx , nonStickyMatchingRequest )
392389 metrics .DirectQueryDispatchNonStickyLatency .With (metricsHandler ).Record (time .Since (nonStickyStartTime ))
390+ if err != nil {
391+ return nil , err
392+ }
393393 metrics .DirectQueryDispatchNonStickySuccessCount .With (metricsHandler ).Record (1 )
394394 return & historyservice.QueryWorkflowResponse {
395395 Response : & workflowservice.QueryWorkflowResponse {
You can’t perform that action at this time.
0 commit comments