Skip to content

Commit 4278925

Browse files
committed
mark task slot used in async workflow poll task
1 parent ef19423 commit 4278925

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

temporal-sdk/src/main/java/io/temporal/internal/worker/AsyncWorkflowPollTask.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
public class AsyncWorkflowPollTask
3131
implements AsyncPoller.PollTaskAsync<WorkflowTask>, DisableNormalPolling {
3232
private static final Logger log = LoggerFactory.getLogger(AsyncWorkflowPollTask.class);
33-
private final TrackingSlotSupplier<?> slotSupplier;
33+
private final TrackingSlotSupplier<WorkflowSlotInfo> slotSupplier;
3434
private final WorkflowServiceStubs service;
3535
private final Scope metricsScope;
3636
private final Scope pollerMetricScope;
@@ -150,6 +150,7 @@ public CompletableFuture<WorkflowTask> poll(SlotPermit permit)
150150
.inc(1);
151151
return null;
152152
}
153+
slotSupplier.markSlotUsed(new WorkflowSlotInfo(r, pollRequest), permit);
153154
pollerMetricScope
154155
.counter(MetricsType.WORKFLOW_TASK_QUEUE_POLL_SUCCEED_COUNTER)
155156
.inc(1);

0 commit comments

Comments
 (0)