Skip to content

Commit 32410dc

Browse files
authored
Use ListWorkflow instead of ScanWorkflow for batch operation (#2620)
1 parent e2d6b31 commit 32410dc

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

service/worker/batcher/workflow.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,7 @@ func BatchActivity(ctx context.Context, batchParams BatchParams) (HeartBeatDetai
266266
}
267267

268268
for {
269-
// TODO https://github.com/uber/cadence/issues/2154
270-
// Need to improve scan concurrency because it will hold an ES resource until the workflow finishes.
271-
// And we can't use list API because terminate / reset will mutate the result.
272-
resp, err := sdkClient.ScanWorkflow(ctx, &workflowservice.ScanWorkflowExecutionsRequest{
269+
resp, err := sdkClient.ListWorkflow(ctx, &workflowservice.ListWorkflowExecutionsRequest{
273270
PageSize: int32(pageSize),
274271
NextPageToken: hbd.PageToken,
275272
Query: batchParams.Query,

0 commit comments

Comments
 (0)