Skip to content

Add scheduleToStart timeout to Local Activities#1560

Merged
Spikhalskiy merged 1 commit intotemporalio:masterfrom
Spikhalskiy:issue-1512
Dec 9, 2022
Merged

Add scheduleToStart timeout to Local Activities#1560
Spikhalskiy merged 1 commit intotemporalio:masterfrom
Spikhalskiy:issue-1512

Conversation

@Spikhalskiy
Copy link
Copy Markdown
Contributor

@Spikhalskiy Spikhalskiy commented Dec 6, 2022

LocalActivityWorker is reworked to remove the unneeded poller and two queues between the workflow code and the executor have been reduced to one.
Backpressure for new executions is implemented with retries always having a green light.
Additional guards were added that prevent retries when activity execution is already completed by a timeout.

Partially addresses #1510
Closes #1512

@Spikhalskiy Spikhalskiy force-pushed the issue-1512 branch 9 times, most recently from 75a342d to a80f27c Compare December 8, 2022 21:56
@Spikhalskiy Spikhalskiy marked this pull request as ready for review December 8, 2022 21:59
@Spikhalskiy Spikhalskiy force-pushed the issue-1512 branch 3 times, most recently from b4366e2 to 0b8b6ff Compare December 9, 2022 00:22
Copy link
Copy Markdown
Member

@Sushisource Sushisource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. This definitely improved the readability in the worker a bit

Comment thread temporal-sdk/src/main/java/io/temporal/activity/LocalActivityOptions.java Outdated
Comment on lines +287 to +288
// TODO do we have to fail? if we didn't fit in a potentially tight timeout left until
// wftHeartbeatDeadline,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you do. In core there is no bound on the local activity queue, just the number of slots.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's not really a question, it's just a representation of my thinking. I think we should limit it by one WFT timeout though and fail WFT after to get backpressure all the way up. May be especially important if one worker experiences issues that cause long LA execution and exhausting of LA executor threads.
I will think more about how to improve it. This preserves the existing behavior for now in this regard.

@Spikhalskiy Spikhalskiy force-pushed the issue-1512 branch 2 times, most recently from 162a0f0 to 76895da Compare December 9, 2022 02:25
@Spikhalskiy Spikhalskiy enabled auto-merge (squash) December 9, 2022 02:26
@Spikhalskiy Spikhalskiy disabled auto-merge December 9, 2022 02:29
@Spikhalskiy Spikhalskiy enabled auto-merge (squash) December 9, 2022 02:30
@Spikhalskiy Spikhalskiy merged commit f389bd8 into temporalio:master Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add scheduleToStart to LocalActivityOptions

2 participants