Skip to content

[native] Clean old tasks based on termination time#21368

Merged
spershin merged 1 commit intoprestodb:masterfrom
kevinwilfong:termination_time
Nov 13, 2023
Merged

[native] Clean old tasks based on termination time#21368
spershin merged 1 commit intoprestodb:masterfrom
kevinwilfong:termination_time

Conversation

@kevinwilfong
Copy link
Contributor

@kevinwilfong kevinwilfong commented Nov 10, 2023

Currently we clean old tasks based on end time. End time is set when the task finishes processing. Significant time may pass between that point and when downstream workers finish consuming results, when the task is terminated. In such situations the task is cleaned up immediately after being terminated, leading to race conditions with in flight status requests.

Using the termination time is safer and a closer analog to what is used in Java.

Currently we clean old tasks based on end time. End time is set when
the task finishes processing. Significant time may pass between that
point and when downstream workers finish consuming results, when the
task is terminated. In such situations the task is cleaned up
immediately after being terminated, leading to race conditions with
in flight status requests.

Using the termination time is safer and a closer analog to what is
used in Java.
@kevinwilfong kevinwilfong requested a review from a team as a code owner November 10, 2023 23:39
@kevinwilfong kevinwilfong marked this pull request as draft November 11, 2023 00:44
@kevinwilfong kevinwilfong marked this pull request as ready for review November 13, 2023 17:50
Copy link
Contributor

@spershin spershin left a comment

Choose a reason for hiding this comment

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

Thanks!

@spershin spershin merged commit 1ca0f98 into prestodb:master Nov 13, 2023
@wanglinsong wanglinsong mentioned this pull request Dec 8, 2023
26 tasks
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.

2 participants