-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Transform] Introduce TransformScheduler central service #84657
[Transform] Introduce TransformScheduler central service #84657
Conversation
7d3cc9e
to
d374e9e
Compare
a799c76
to
4560772
Compare
4560772
to
dda2cc0
Compare
4376066
to
ab42380
Compare
cb2b596
to
be0171a
Compare
be0171a
to
780a702
Compare
54fa083
to
8a0ec3c
Compare
run elasticsearch-ci/part-2 |
e7e109b
to
f8c33a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add some first round comments and questions
...form/src/main/java/org/elasticsearch/xpack/transform/transforms/ConcurrentPriorityQueue.java
Outdated
Show resolved
Hide resolved
...transform/src/main/java/org/elasticsearch/xpack/transform/transforms/TransformScheduler.java
Outdated
Show resolved
Hide resolved
...transform/src/main/java/org/elasticsearch/xpack/transform/transforms/TransformScheduler.java
Outdated
Show resolved
Hide resolved
...transform/src/main/java/org/elasticsearch/xpack/transform/transforms/TransformScheduler.java
Outdated
Show resolved
Hide resolved
...transform/src/main/java/org/elasticsearch/xpack/transform/transforms/TransformScheduler.java
Outdated
Show resolved
Hide resolved
...transform/src/main/java/org/elasticsearch/xpack/transform/transforms/TransformScheduler.java
Outdated
Show resolved
Hide resolved
...transform/src/main/java/org/elasticsearch/xpack/transform/transforms/TransformScheduler.java
Outdated
Show resolved
Hide resolved
...transform/src/main/java/org/elasticsearch/xpack/transform/transforms/TransformScheduler.java
Outdated
Show resolved
Hide resolved
...transform/src/main/java/org/elasticsearch/xpack/transform/transforms/TransformScheduler.java
Outdated
Show resolved
Hide resolved
...form/src/main/java/org/elasticsearch/xpack/transform/transforms/ConcurrentPriorityQueue.java
Outdated
Show resolved
Hide resolved
...transform/src/main/java/org/elasticsearch/xpack/transform/transforms/TransformScheduler.java
Outdated
Show resolved
Hide resolved
...transform/src/main/java/org/elasticsearch/xpack/transform/transforms/TransformScheduler.java
Outdated
Show resolved
Hide resolved
...transform/src/main/java/org/elasticsearch/xpack/transform/transforms/TransformScheduler.java
Outdated
Show resolved
Hide resolved
...form/src/test/java/org/elasticsearch/xpack/transform/transforms/TransformSchedulerTests.java
Outdated
Show resolved
Hide resolved
...form/src/main/java/org/elasticsearch/xpack/transform/transforms/ConcurrentPriorityQueue.java
Outdated
Show resolved
Hide resolved
cdf95fe
to
9300a47
Compare
f322f28
to
e73dea6
Compare
...rc/main/java/org/elasticsearch/xpack/transform/transforms/scheduling/TransformScheduler.java
Show resolved
Hide resolved
...ava/org/elasticsearch/xpack/transform/transforms/scheduling/TransformScheduledTaskQueue.java
Outdated
Show resolved
Hide resolved
...ava/org/elasticsearch/xpack/transform/transforms/scheduling/TransformScheduledTaskQueue.java
Outdated
Show resolved
Hide resolved
...ava/org/elasticsearch/xpack/transform/transforms/scheduling/TransformScheduledTaskQueue.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/elasticsearch/xpack/transform/transforms/scheduling/TransformScheduler.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I left some minor comments
...ain/java/org/elasticsearch/xpack/transform/transforms/scheduling/TransformScheduledTask.java
Show resolved
Hide resolved
...ain/java/org/elasticsearch/xpack/transform/transforms/scheduling/TransformScheduledTask.java
Outdated
Show resolved
Hide resolved
...ava/org/elasticsearch/xpack/transform/transforms/scheduling/TransformScheduledTaskQueue.java
Outdated
Show resolved
Hide resolved
...ava/org/elasticsearch/xpack/transform/transforms/scheduling/TransformScheduledTaskQueue.java
Outdated
Show resolved
Hide resolved
...ava/org/elasticsearch/xpack/transform/transforms/scheduling/TransformScheduledTaskQueue.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/elasticsearch/xpack/transform/transforms/scheduling/TransformScheduler.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/elasticsearch/xpack/transform/transforms/scheduling/TransformScheduler.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/elasticsearch/xpack/transform/transforms/scheduling/TransformScheduler.java
Outdated
Show resolved
Hide resolved
Express the default frequency in seconds
f27336f
to
7c705c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no further comments. LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR introduces
TransformScheduler
class as a central place for scheduling transform tasks. The outline of how this mechanism works is:next_scheduled_time
_start
a transform task is added to the queueschedulerFrequency
(defaulting to5s
) the first task is being picked up from the queue and processed, i.e.: its listener is being triggered (indirectly triggering the indexer)_stop
a transform task is removed from the queue and no longer processednext_scheduled_time
is updated so that it is processed before it normally would. We are using exponential backoff scheme to calculate the appropriate delaysSchedulerEngine
is no longer usedAdditionally, this PR implements unit tests for
TransformTaskParams
andTransformContext
classes.The following work items are not covered by this PR. These will be handled separately, in the subsequent PRs:
numFailureRetries
numFailureRetries
Relates to #85016