You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "jiexray (via GitHub)" <gi...@apache.org> on 2025/09/23 02:18:58 UTC
[PR] [FLINK-38364][runtime] Implement async state version of ProcessingTimeoutTrigger [flink]
jiexray opened a new pull request, #27027:
URL: https://github.com/apache/flink/pull/27027
<!--
*Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
*Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
## Contribution Checklist
- Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
- Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
- Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
- Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
- Each pull request should address only one issue, not mix up code from multiple issues.
- Each commit in the pull request has a meaningful commit message (including the JIRA id)
- Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
**(The sections below can be removed for hotfixes of typos)**
-->
## Implement `AsyncProcessingTimeoutTrigger`, the async state version of `ProcessingTimeoutTrigger`
Before this pr, `ProcessingTimeoutTrigger` only supports sync state mode. After this pr, user can use `AsyncProcessingTimeoutTrigger`, and enable async state mode.
## Brief change log
- Add `AsyncProcessingTimeoutTrigger`, support `ProcessingTimeoutTrigger` in async mode.
## Verifying this change
- Parameterize `ProcessingTimeoutTriggerTest` to test both sync and async state mode.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
- The S3 file system connector: no
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38364][streaming-java] Implement async state version of ProcessingTimeoutTrigger [flink]
Posted by "Zakelly (via GitHub)" <gi...@apache.org>.
Zakelly merged PR #27027:
URL: https://github.com/apache/flink/pull/27027
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38364][runtime] Implement async state version of ProcessingTimeoutTrigger [flink]
Posted by "Zakelly (via GitHub)" <gi...@apache.org>.
Zakelly commented on code in PR #27027:
URL: https://github.com/apache/flink/pull/27027#discussion_r2380833432
##########
flink-runtime/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AsyncTriggerConvertable.java:
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.runtime.operators.windowing;
+
+import org.apache.flink.annotation.Internal;
+
+import javax.annotation.Nonnull;
+
+/**
+ * Interface for declaring the ability to convert a sync {@code Trigger} to {@code AsyncTrigger}.
+ * The trigger conversion happens in {@code AsyncTriggerConverter}.
+ */
+@Internal
+public interface AsyncTriggerConvertable {
Review Comment:
Ah... why we introduce this interface since we already have `AsyncTriggerConverter`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38364][runtime] Implement async state version of ProcessingTimeoutTrigger [flink]
Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #27027:
URL: https://github.com/apache/flink/pull/27027#issuecomment-3322138022
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e4cd5ed371ffbbaa61e88b35d8bb49ba72f529ed",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "e4cd5ed371ffbbaa61e88b35d8bb49ba72f529ed",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* e4cd5ed371ffbbaa61e88b35d8bb49ba72f529ed UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38364][streaming-java] Implement async state version of ProcessingTimeoutTrigger [flink]
Posted by "jiexray (via GitHub)" <gi...@apache.org>.
jiexray commented on PR #27027:
URL: https://github.com/apache/flink/pull/27027#issuecomment-3388028602
@flinkbot run azure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38364][runtime] Implement async state version of ProcessingTimeoutTrigger [flink]
Posted by "Zakelly (via GitHub)" <gi...@apache.org>.
Zakelly commented on code in PR #27027:
URL: https://github.com/apache/flink/pull/27027#discussion_r2380840508
##########
flink-runtime/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AsyncTriggerConvertable.java:
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.runtime.operators.windowing;
+
+import org.apache.flink.annotation.Internal;
+
+import javax.annotation.Nonnull;
+
+/**
+ * Interface for declaring the ability to convert a sync {@code Trigger} to {@code AsyncTrigger}.
+ * The trigger conversion happens in {@code AsyncTriggerConverter}.
+ */
+@Internal
+public interface AsyncTriggerConvertable {
Review Comment:
I'd suggest we unify the behavior, only use one interface/method to convert the trigger.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38364][runtime] Implement async state version of ProcessingTimeoutTrigger [flink]
Posted by "jiexray (via GitHub)" <gi...@apache.org>.
jiexray commented on PR #27027:
URL: https://github.com/apache/flink/pull/27027#issuecomment-3332876542
@flinkbot run azure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38364][runtime] Implement async state version of ProcessingTimeoutTrigger [flink]
Posted by "jiexray (via GitHub)" <gi...@apache.org>.
jiexray commented on PR #27027:
URL: https://github.com/apache/flink/pull/27027#issuecomment-3322150631
@Zakelly Could you have a look at this pr, which resolves [this ticket](https://issues.apache.org/jira/browse/FLINK-38364).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38364][streaming-java] Implement async state version of ProcessingTimeoutTrigger [flink]
Posted by "jiexray (via GitHub)" <gi...@apache.org>.
jiexray commented on PR #27027:
URL: https://github.com/apache/flink/pull/27027#issuecomment-3395647564
@flinkbot run azure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38364][runtime] Implement async state version of ProcessingTimeoutTrigger [flink]
Posted by "jiexray (via GitHub)" <gi...@apache.org>.
jiexray commented on code in PR #27027:
URL: https://github.com/apache/flink/pull/27027#discussion_r2381136948
##########
flink-runtime/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/AsyncTriggerConvertable.java:
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.streaming.runtime.operators.windowing;
+
+import org.apache.flink.annotation.Internal;
+
+import javax.annotation.Nonnull;
+
+/**
+ * Interface for declaring the ability to convert a sync {@code Trigger} to {@code AsyncTrigger}.
+ * The trigger conversion happens in {@code AsyncTriggerConverter}.
+ */
+@Internal
+public interface AsyncTriggerConvertable {
Review Comment:
Good idea! I refactor the APIs for converting `Trigger`, and union all of them in `AsyncTriggerConverter`.
The two APIs are as follows:
```
public interface AsyncTriggerConverter {
// Virtual member function: the implementation declares its own way to spawn `AsyncTrigger`
// (for example, `ProcessingTimeoutTrigger`).
Object convertToAsync();
// Static function: the enter point for converting any `Trigger` to `AsyncTrigger`.
static AsyncTrigger convertToAsync(Trigger trigger);
}
```
The integration of the two APIs are tested in `AsyncTriggerConverterTest`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38364][streaming-java] Implement async state version of ProcessingTimeoutTrigger [flink]
Posted by "jiexray (via GitHub)" <gi...@apache.org>.
jiexray commented on PR #27027:
URL: https://github.com/apache/flink/pull/27027#issuecomment-3396030006
@flinkbot run azure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38364][streaming-java] Implement async state version of ProcessingTimeoutTrigger [flink]
Posted by "jiexray (via GitHub)" <gi...@apache.org>.
jiexray commented on PR #27027:
URL: https://github.com/apache/flink/pull/27027#issuecomment-3397062882
> LGTM.
>
> The CI fails and the flinkbot seems not responding, maybe a force-push would help.
Thank you for reviewing. I have re-run the CI pipeline, and the recent CI run passed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38364][streaming-java] Implement async state version of ProcessingTimeoutTrigger [flink]
Posted by "jiexray (via GitHub)" <gi...@apache.org>.
jiexray commented on PR #27027:
URL: https://github.com/apache/flink/pull/27027#issuecomment-3383833713
@flinkbot run azure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-38364][runtime] Implement async state version of ProcessingTimeoutTrigger [flink]
Posted by "jiexray (via GitHub)" <gi...@apache.org>.
jiexray commented on PR #27027:
URL: https://github.com/apache/flink/pull/27027#issuecomment-3331950320
> Thanks for the PR! I was thinking it's better we use this converter in `AsyncTriggerConverter`
@Zakelly Thank you for review. That's a good idea. I have intergrated `ProcessingTimeoutTrigger` to `AsyncTriggerConverter`.
The changes in brief:
- **flink-runtime**: Introduce a new interface (`AsyncTriggerConvertable`). A trigger implemented the interface has an API (`convertToAsync`) to spawn its async version.
- **flink-streaming-java**: `ProcessingTimeoutTrigger` implements `AsyncTriggerConvertable`.
- **tests**: `ProcessingTimeoutTriggerTest` uses `AsyncTriggerConverter#convertToAsync` to generate the async version of `ProcessingTimeoutTrigger`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org