You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/07/08 13:33:10 UTC
[GitHub] [flink] gaoyunhaii opened a new pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
gaoyunhaii opened a new pull request #16432:
URL: https://github.com/apache/flink/pull/16432
## What is the purpose of the change
This PR changes how checkpoint in OperatorCoordinator tracks the result of the previously sent event to be that the failed events would be kept till it has been processed (namely triggered failover for the corresponding subtasks). Otherwise there might be event loses if there are checkpoints after fails to sending event and the subtask failover due to the lost event won't be included in these checkpoints.
## Brief change log
- 3f92e0cf1c13240efad8e5227ec2eec55cf6028d changes the event tracking logic.
## Verifying this change
*(Please pick either of the following options)*
This change can be verified by the added unit tests and by the manually test with the failed cases.
## 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**
## Documentation
- Does this pull request introduce a new feature? **no**
- If yes, how is the feature documented? **not applicable**
--
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
[GitHub] [flink] flinkbot edited a comment on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-876475935
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20187",
"triggerID" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"triggerType" : "PUSH"
}, {
"hash" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20190",
"triggerID" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"triggerType" : "PUSH"
}, {
"hash" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20203",
"triggerID" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"triggerType" : "PUSH"
}, {
"hash" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20209",
"triggerID" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"triggerType" : "PUSH"
}, {
"hash" : "ff669457be6d04cb4da6986015ff8852b146925d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20261",
"triggerID" : "ff669457be6d04cb4da6986015ff8852b146925d",
"triggerType" : "PUSH"
}, {
"hash" : "91fe9357e6c36dac5fef28d9766b5b01f0401546",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20336",
"triggerID" : "91fe9357e6c36dac5fef28d9766b5b01f0401546",
"triggerType" : "PUSH"
}, {
"hash" : "eb00c919c45cf86258863260adf5ba8066cca0f0",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20343",
"triggerID" : "eb00c919c45cf86258863260adf5ba8066cca0f0",
"triggerType" : "PUSH"
}, {
"hash" : "eb00c919c45cf86258863260adf5ba8066cca0f0",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20353",
"triggerID" : "878739640",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* eb00c919c45cf86258863260adf5ba8066cca0f0 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20343) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20353)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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
[GitHub] [flink] flinkbot edited a comment on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-876475935
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20187",
"triggerID" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"triggerType" : "PUSH"
}, {
"hash" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20190",
"triggerID" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"triggerType" : "PUSH"
}, {
"hash" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20203",
"triggerID" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"triggerType" : "PUSH"
}, {
"hash" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20209",
"triggerID" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"triggerType" : "PUSH"
}, {
"hash" : "ff669457be6d04cb4da6986015ff8852b146925d",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "ff669457be6d04cb4da6986015ff8852b146925d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20209)
* ff669457be6d04cb4da6986015ff8852b146925d UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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
[GitHub] [flink] gaoyunhaii edited a comment on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
gaoyunhaii edited a comment on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-877487310
Very thanks @tillrohrmann for the review and very thanks @StephanEwen for the detail investigation and analysis!
I also agree with chaining the futures as @tillrohrmann suggested would be correct and simpler . I'll update the PR according to this method very soon.
And for clarification, for the original method that used
```
sendingExecutor.execute(
() -> {
nonSuccessFuturesTrack.trackFuture(result);
sender.sendEvent(sendAction, result);
});
```
my understanding is that the order is ensured since it all happen inside the main thread. For detail:
Based on the current implementation, actual event sending (namely `sendingExecutor`) and `OperatorCoordinatorHolder#checkpointCoordinatorInternal` are all happens in the main thread. Then for all the events during checkpointing
1. `OperatorCoordinator#checkpointCoordinator`, happen in main thread, the implementation may proxy it to the user thread.
2. submit `completeCheckpointOnceEventsAreDone` to the main thread, happen in user thread.
3. actually execute `completeCheckpointOnceEventsAreDone`, happen in main thread.
First with my understand now we should request the implementation of `OperatorCoordinator` to ensure there is not event sending request between 1 and 2, otherwise both methods would have problem. Then for an event sending request, it either happen before 1 and submit a Runnable to the main thread before 3, or happen after 2 and submit a Runnable to the main thread after 3:
1. For the first case, `trackFuture` would happen before `completeCheckpointOnceEventsAreDone` and considered.
2. For the second case, `trackFuture` must happen after `completeCheckpointOnceEventsAreDone` and would not be considered.
--
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
[GitHub] [flink] flinkbot edited a comment on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-876475935
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20187",
"triggerID" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"triggerType" : "PUSH"
}, {
"hash" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20190",
"triggerID" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"triggerType" : "PUSH"
}, {
"hash" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20203",
"triggerID" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"triggerType" : "PUSH"
}, {
"hash" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20209",
"triggerID" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"triggerType" : "PUSH"
}, {
"hash" : "ff669457be6d04cb4da6986015ff8852b146925d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20261",
"triggerID" : "ff669457be6d04cb4da6986015ff8852b146925d",
"triggerType" : "PUSH"
}, {
"hash" : "91fe9357e6c36dac5fef28d9766b5b01f0401546",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20336",
"triggerID" : "91fe9357e6c36dac5fef28d9766b5b01f0401546",
"triggerType" : "PUSH"
}, {
"hash" : "eb00c919c45cf86258863260adf5ba8066cca0f0",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20343",
"triggerID" : "eb00c919c45cf86258863260adf5ba8066cca0f0",
"triggerType" : "PUSH"
}, {
"hash" : "eb00c919c45cf86258863260adf5ba8066cca0f0",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20353",
"triggerID" : "878739640",
"triggerType" : "MANUAL"
}, {
"hash" : "7135067e35f7fa0041964386bfcf382ee5bb8d28",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20363",
"triggerID" : "7135067e35f7fa0041964386bfcf382ee5bb8d28",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* eb00c919c45cf86258863260adf5ba8066cca0f0 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20343) Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20353)
* 7135067e35f7fa0041964386bfcf382ee5bb8d28 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20363)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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
[GitHub] [flink] flinkbot edited a comment on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-876475935
--
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
[GitHub] [flink] gaoyunhaii edited a comment on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
gaoyunhaii edited a comment on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-877487310
Very thanks @tillrohrmann for the review and very thanks @StephanEwen for the detail investigation and analysis!
I also agree with chaining the futures as @tillrohrmann suggested would be correct and simpler . I'll update the PR according to this method very soon.
And for clarification, for the original method that used
```
sendingExecutor.execute(
() -> {
nonSuccessFuturesTrack.trackFuture(result);
sender.sendEvent(sendAction, result);
});
```
my understanding is that the order is ensured since both the above Runnable and `completeCheckpointOnceEventsAreDone` happen inside the main thread. For detail:
For all the events during checkpointing
1. `OperatorCoordinator#checkpointCoordinator`, happen in main thread, the implementation may proxy it to the user thread.
2. submit `completeCheckpointOnceEventsAreDone` to the main thread, happen in user thread.
3. actually execute `completeCheckpointOnceEventsAreDone`, happen in main thread.
First with my understand now we should request the implementation of `OperatorCoordinator` to ensure there is not event sending request between 1 and 2, otherwise both methods would have problem. Then for an event sending request, it either happen before 1 and submit a Runnable to the main thread before 3, or happen after 2 and submit a Runnable to the main thread after 3:
1. For the first case, `trackFuture` would happen before `completeCheckpointOnceEventsAreDone` and considered.
2. For the second case, `trackFuture` must happen after `completeCheckpointOnceEventsAreDone` and would not be considered.
--
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
[GitHub] [flink] tillrohrmann edited a comment on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
tillrohrmann edited a comment on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-877165059
@gaoyunhaii could you show me where exactly the deadlock will happen? I could not find it based on your description. I think the checkpoint won't block the main thread.
--
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
[GitHub] [flink] gaoyunhaii commented on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
gaoyunhaii commented on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-878739640
@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
[GitHub] [flink] flinkbot commented on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-876450302
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.
## Automated Checks
Last check on commit 3f92e0cf1c13240efad8e5227ec2eec55cf6028d (Thu Jul 08 13:42:57 UTC 2021)
**Warnings:**
* No documentation files were touched! Remember to keep the Flink docs up to date!
<sub>Mention the bot in a comment to re-run the automated checks.</sub>
## Review Progress
* ❓ 1. The [description] looks good.
* ❓ 2. There is [consensus] that the contribution should go into to Flink.
* ❓ 3. Needs [attention] from.
* ❓ 4. The change fits into the overall [architecture].
* ❓ 5. Overall code [quality] is good.
Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
- `@flinkbot approve all` to approve all aspects
- `@flinkbot approve-until architecture` to approve everything until `architecture`
- `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
- `@flinkbot disapprove architecture` to remove an approval you gave earlier
</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
[GitHub] [flink] flinkbot edited a comment on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-876475935
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20187",
"triggerID" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"triggerType" : "PUSH"
}, {
"hash" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20190",
"triggerID" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"triggerType" : "PUSH"
}, {
"hash" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20203",
"triggerID" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"triggerType" : "PUSH"
}, {
"hash" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20209",
"triggerID" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"triggerType" : "PUSH"
}, {
"hash" : "ff669457be6d04cb4da6986015ff8852b146925d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20261",
"triggerID" : "ff669457be6d04cb4da6986015ff8852b146925d",
"triggerType" : "PUSH"
}, {
"hash" : "91fe9357e6c36dac5fef28d9766b5b01f0401546",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20336",
"triggerID" : "91fe9357e6c36dac5fef28d9766b5b01f0401546",
"triggerType" : "PUSH"
}, {
"hash" : "eb00c919c45cf86258863260adf5ba8066cca0f0",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20343",
"triggerID" : "eb00c919c45cf86258863260adf5ba8066cca0f0",
"triggerType" : "PUSH"
}, {
"hash" : "eb00c919c45cf86258863260adf5ba8066cca0f0",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20353",
"triggerID" : "878739640",
"triggerType" : "MANUAL"
}, {
"hash" : "7135067e35f7fa0041964386bfcf382ee5bb8d28",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "7135067e35f7fa0041964386bfcf382ee5bb8d28",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* eb00c919c45cf86258863260adf5ba8066cca0f0 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20343) Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20353)
* 7135067e35f7fa0041964386bfcf382ee5bb8d28 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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
[GitHub] [flink] gaoyunhaii commented on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
gaoyunhaii commented on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-877544691
Hi, I updated the PR according to the above comments. During the implementation and test I found that we would still need to keep tracking future to be atomic with event sending: suppose the user thread is keeping sending events, and now a checkpoint is triggered and finally we call `tryShutValve` in the main thread, then the following events are viewed as after checkpoint and will be cached, and we should not track their futures. Thus the tracking would still need to be together with the sending and executed in the main thread.
--
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
[GitHub] [flink] gaoyunhaii commented on a change in pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
gaoyunhaii commented on a change in pull request #16432:
URL: https://github.com/apache/flink/pull/16432#discussion_r666632156
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/util/NonSuccessFuturesTrack.java
##########
@@ -0,0 +1,86 @@
+/*
+ * 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.runtime.operators.coordination.util;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.locks.ReentrantLock;
+
+import static org.apache.flink.util.Preconditions.checkState;
+
+/**
+ * This trackers remember the CompletableFutures if they are not complete normally. It also allows
+ * the callers to remove the failed ones after they have handled the future.
+ */
+public class NonSuccessFuturesTrack {
Review comment:
Yes, `IncompleteFuturesTracker` is still used in the code. I renamed it to `IncompleteFuturesTracker`
--
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
[GitHub] [flink] flinkbot edited a comment on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-876475935
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20187",
"triggerID" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"triggerType" : "PUSH"
}, {
"hash" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20190",
"triggerID" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"triggerType" : "PUSH"
}, {
"hash" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20203",
"triggerID" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"triggerType" : "PUSH"
}, {
"hash" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 473db5d7954ebc197a64bb49d3b91d5c09d2c595 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20203)
* 1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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
[GitHub] [flink] gaoyunhaii commented on a change in pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
gaoyunhaii commented on a change in pull request #16432:
URL: https://github.com/apache/flink/pull/16432#discussion_r666637899
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/util/IncompleteFuturesTracker.java
##########
@@ -108,4 +94,22 @@ void removeFromSet(CompletableFuture<?> future) {
lock.unlock();
}
}
+
+ @VisibleForTesting
+ Collection<CompletableFuture<?>> getCurrentIncomplete() {
Review comment:
Sorry here I made a mistake that I initially want to make this method a pure getter one without modifying the state, and it would be only used in the tests for the verification. Do you think this would be also ok that I remove `incompleteFutures.clear()` and keep the name as `getCurrentIncomplete()` ?
--
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
[GitHub] [flink] gaoyunhaii commented on a change in pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
gaoyunhaii commented on a change in pull request #16432:
URL: https://github.com/apache/flink/pull/16432#discussion_r666638491
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolderTest.java
##########
@@ -370,6 +373,82 @@ private void checkpointEventValueAtomicity(
}
}
+ @Test
+ public void testFailingCheckpointsIfSendingEventFailed() throws Exception {
+ CompletableFuture<Acknowledge> eventSendingResult = new CompletableFuture<>();
+ final EventReceivingTasks tasks =
+ EventReceivingTasks.createForRunningTasksWithRpcResult(eventSendingResult);
+ final OperatorCoordinatorHolder holder =
+ createCoordinatorHolder(tasks, TestingOperatorCoordinator::new);
+
+ // Send one event without finishing it.
+ getCoordinator(holder).getSubtaskGateway(0).sendEvent(new TestOperatorEvent(0));
+
+ // Triggers one checkpoint.
+ CompletableFuture<byte[]> checkpointResult = new CompletableFuture<>();
+ holder.checkpointCoordinator(1, checkpointResult);
+ getCoordinator(holder).getLastTriggeredCheckpoint().complete(new byte[0]);
+
+ // Fails the event sending.
+ eventSendingResult.completeExceptionally(new RuntimeException("Artificial"));
+
+ assertTrue(eventSendingResult.isCompletedExceptionally());
+ }
Review comment:
Very sorry for the careless, this should indeed be `assertTrue(checkpointResult.isCompletedExceptionally())`.
--
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
[GitHub] [flink] flinkbot edited a comment on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-876475935
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20187",
"triggerID" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"triggerType" : "PUSH"
}, {
"hash" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20190",
"triggerID" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* fa6a87a6d47d79d400ef4964b168e8a767c8bad0 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20190)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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
[GitHub] [flink] gaoyunhaii commented on a change in pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
gaoyunhaii commented on a change in pull request #16432:
URL: https://github.com/apache/flink/pull/16432#discussion_r666353812
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/SubtaskGatewayImpl.java
##########
@@ -72,19 +79,28 @@
FutureUtils.assertNoException(
result.handleAsync(
(success, failure) -> {
- if (failure != null && subtaskAccess.isStillRunning()) {
- String msg =
- String.format(
- EVENT_LOSS_ERROR_MESSAGE,
- evt,
- subtaskAccess.subtaskName());
- subtaskAccess.triggerTaskFailover(new FlinkException(msg, failure));
+ if (failure != null) {
+ if (subtaskAccess.isStillRunning()) {
+ String msg =
+ String.format(
+ EVENT_LOSS_ERROR_MESSAGE,
+ evt,
+ subtaskAccess.subtaskName());
+ subtaskAccess.triggerTaskFailover(
+ new FlinkException(msg, failure));
+ }
+
+ nonSuccessFuturesTrack.removeFailedFuture(result);
Review comment:
Hi Till, very thanks for the review! First for this issue, my initial concern for this method is that it seems might cause deadlocks:
1. For a checkpoint when it gets to the `completeCheckpointOnceEventsAreDone`, it would block the main thread and waits for all the pending event futures (with this method it would be the `whenAsync` one) are done.
2. When the event sending result future finished, the thread finish it would also try to submit the `whenAsync` stage to the main thread, which would not get executed since the main thread is blocked.
--
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
[GitHub] [flink] flinkbot commented on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-876475935
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 3f92e0cf1c13240efad8e5227ec2eec55cf6028d UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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
[GitHub] [flink] gaoyunhaii commented on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
gaoyunhaii commented on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-877487310
Very thanks @tillrohrmann for the review and very thanks @StephanEwen for the detail investigation and analysis!
I also agree with chaining the futures as @tillrohrmann suggested would be correct and simpler . I'll update the PR according to this method very soon.
And for clarification, for the original method that used
```
sendingExecutor.execute(
() -> {
nonSuccessFuturesTrack.trackFuture(result);
sender.sendEvent(sendAction, result);
});
```
my understanding is that the order is ensured since it all happen inside the main thread. For detail:
Based on the current implementation, actual event sending (namely `sendingExecutor`) and `OperatorCoordinatorHolder#checkpointCoordinatorInternal` are all happens in the main thread. Then for all the events during checkpointing
1. `OperatorCoordinator#checkpointCoordinator`, happen in main thread, the implementation may proxy it to the user thread.
2. submit `completeCheckpointOnceEventsAreDone` to the main thread, happen in user thread.
3. actually execute `completeCheckpointOnceEventsAreDone`, happen in main thread.
First with my understand now we should request the implementation of `OperatorCoordinator` to ensure there is not event sending request between 1 and 2, otherwise both methods would have problem. Then for an event sending request, an event sending either happen before 1 and submit a Runnable to the main thread before 3, or happen after 2 and submit a Runnable to the main thread after 3:
1. For the first case, `trackFuture` would happen before `completeCheckpointOnceEventsAreDone` and considered.
2. For the second case, `trackFuture` must happen after `completeCheckpointOnceEventsAreDone` and would not be considered.
--
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
[GitHub] [flink] gaoyunhaii commented on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
gaoyunhaii commented on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-878247275
--
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
[GitHub] [flink] flinkbot edited a comment on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-876475935
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20187",
"triggerID" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"triggerType" : "PUSH"
}, {
"hash" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20190",
"triggerID" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"triggerType" : "PUSH"
}, {
"hash" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20203",
"triggerID" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"triggerType" : "PUSH"
}, {
"hash" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20209",
"triggerID" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20209)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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
[GitHub] [flink] gaoyunhaii commented on a change in pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
gaoyunhaii commented on a change in pull request #16432:
URL: https://github.com/apache/flink/pull/16432#discussion_r666640109
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolderTest.java
##########
@@ -370,6 +373,82 @@ private void checkpointEventValueAtomicity(
}
}
+ @Test
+ public void testFailingCheckpointsIfSendingEventFailed() throws Exception {
+ CompletableFuture<Acknowledge> eventSendingResult = new CompletableFuture<>();
+ final EventReceivingTasks tasks =
+ EventReceivingTasks.createForRunningTasksWithRpcResult(eventSendingResult);
+ final OperatorCoordinatorHolder holder =
+ createCoordinatorHolder(tasks, TestingOperatorCoordinator::new);
+
+ // Send one event without finishing it.
+ getCoordinator(holder).getSubtaskGateway(0).sendEvent(new TestOperatorEvent(0));
+
+ // Triggers one checkpoint.
+ CompletableFuture<byte[]> checkpointResult = new CompletableFuture<>();
+ holder.checkpointCoordinator(1, checkpointResult);
+ getCoordinator(holder).getLastTriggeredCheckpoint().complete(new byte[0]);
+
+ // Fails the event sending.
+ eventSendingResult.completeExceptionally(new RuntimeException("Artificial"));
+
+ assertTrue(eventSendingResult.isCompletedExceptionally());
+ }
+
+ @Test
+ public void testFailingCheckpointIfFailedEventNotProcessed() throws Exception {
+ final ReorderableManualExecutorService executor = new ReorderableManualExecutorService();
+ final ComponentMainThreadExecutor mainThreadExecutor =
+ new ComponentMainThreadExecutorServiceAdapter(
+ (ScheduledExecutorService) executor, Thread.currentThread());
+
+ CompletableFuture<Acknowledge> eventSendingResult = new CompletableFuture<>();
+ final EventReceivingTasks tasks =
+ EventReceivingTasks.createForRunningTasksWithRpcResult(eventSendingResult);
+
+ final OperatorCoordinatorHolder holder =
+ createCoordinatorHolder(tasks, TestingOperatorCoordinator::new, mainThreadExecutor);
+
+ // Send one event without finishing it.
+ getCoordinator(holder).getSubtaskGateway(0).sendEvent(new TestOperatorEvent(0));
+ executor.triggerAll();
+
+ // Finish the event sending. This will insert one runnable that handle
+ // failed events to the executor. And we pending this runnable to
Review comment:
Here should be "delay the runnable", the initial thought is to test the case that a new checkpoint is triggered before the stage to trigger failover get executed, thus we need some method to delay this stage till the checkpoint is triggered.
--
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
[GitHub] [flink] flinkbot edited a comment on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-876475935
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20187",
"triggerID" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"triggerType" : "PUSH"
}, {
"hash" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20190",
"triggerID" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"triggerType" : "PUSH"
}, {
"hash" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20203",
"triggerID" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"triggerType" : "PUSH"
}, {
"hash" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20209",
"triggerID" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"triggerType" : "PUSH"
}, {
"hash" : "ff669457be6d04cb4da6986015ff8852b146925d",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20261",
"triggerID" : "ff669457be6d04cb4da6986015ff8852b146925d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20209)
* ff669457be6d04cb4da6986015ff8852b146925d Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20261)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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
[GitHub] [flink] gaoyunhaii commented on a change in pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
gaoyunhaii commented on a change in pull request #16432:
URL: https://github.com/apache/flink/pull/16432#discussion_r667231362
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/SubtaskGatewayImpl.java
##########
@@ -72,19 +79,28 @@
FutureUtils.assertNoException(
result.handleAsync(
(success, failure) -> {
- if (failure != null && subtaskAccess.isStillRunning()) {
- String msg =
- String.format(
- EVENT_LOSS_ERROR_MESSAGE,
- evt,
- subtaskAccess.subtaskName());
- subtaskAccess.triggerTaskFailover(new FlinkException(msg, failure));
+ if (failure != null) {
+ if (subtaskAccess.isStillRunning()) {
+ String msg =
+ String.format(
+ EVENT_LOSS_ERROR_MESSAGE,
+ evt,
+ subtaskAccess.subtaskName());
+ subtaskAccess.triggerTaskFailover(
+ new FlinkException(msg, failure));
+ }
+
+ nonSuccessFuturesTrack.removeFailedFuture(result);
Review comment:
Yes, indeed, very sorry for I misunderstood at the original implementation.
--
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
[GitHub] [flink] tillrohrmann commented on a change in pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on a change in pull request #16432:
URL: https://github.com/apache/flink/pull/16432#discussion_r666843775
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolderTest.java
##########
@@ -446,6 +525,27 @@ public OperatorCoordinator create(OperatorCoordinator.Context context) {
return holder;
}
+ private static class ReorderableManualExecutorService
+ extends ManuallyTriggeredScheduledExecutorService {
+
+ private boolean pendingNewRunnables;
+
+ private final Queue<Runnable> pendingRunnables = new ArrayDeque<>();
+
+ public void setPendingNewRunnables(boolean pendingNewRunnables) {
Review comment:
Sounds good.
--
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
[GitHub] [flink] flinkbot edited a comment on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-876475935
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20187",
"triggerID" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"triggerType" : "PUSH"
}, {
"hash" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 3f92e0cf1c13240efad8e5227ec2eec55cf6028d Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20187)
* fa6a87a6d47d79d400ef4964b168e8a767c8bad0 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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
[GitHub] [flink] tillrohrmann commented on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-877284936
Technically, both solutions should work (modulo Stephan's investigation of the two things).
If we consider error handling being part of the event sending, then the `whenAsync` approach might be a bit simpler because we don't have the failed futures from previous events that can affect future operations. But I don't have a strong preference apart from that.
--
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
[GitHub] [flink] gaoyunhaii commented on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
gaoyunhaii commented on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-877210956
Hi @tillrohrmann sorry for I should have misunderstood the implementation of `completeCheckpointOnceEventsAreDone`, it should only register a callback instead of doing a blocked waiting. Very sorry for the misleading.
Then it seems indeed also ok to make the checkpoint future waiting on the failure handling future: Since there won't be concurrent checkpoint triggers, thus no new checkpoint would arrive before the pending checkpoint finished; and it should also be ok to delay the checkpoint for a bit while to wait for failing the subtask. This method seems to be simpler based on the current implementation, and do you prefer to this method~?
--
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
[GitHub] [flink] flinkbot edited a comment on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-876475935
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20187",
"triggerID" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"triggerType" : "PUSH"
}, {
"hash" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20190",
"triggerID" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"triggerType" : "PUSH"
}, {
"hash" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20203",
"triggerID" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"triggerType" : "PUSH"
}, {
"hash" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20209",
"triggerID" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"triggerType" : "PUSH"
}, {
"hash" : "ff669457be6d04cb4da6986015ff8852b146925d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20261",
"triggerID" : "ff669457be6d04cb4da6986015ff8852b146925d",
"triggerType" : "PUSH"
}, {
"hash" : "91fe9357e6c36dac5fef28d9766b5b01f0401546",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20336",
"triggerID" : "91fe9357e6c36dac5fef28d9766b5b01f0401546",
"triggerType" : "PUSH"
}, {
"hash" : "eb00c919c45cf86258863260adf5ba8066cca0f0",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20343",
"triggerID" : "eb00c919c45cf86258863260adf5ba8066cca0f0",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* eb00c919c45cf86258863260adf5ba8066cca0f0 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20343)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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
[GitHub] [flink] tillrohrmann commented on a change in pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on a change in pull request #16432:
URL: https://github.com/apache/flink/pull/16432#discussion_r666216609
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/util/NonSuccessFuturesTrack.java
##########
@@ -0,0 +1,86 @@
+/*
+ * 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.runtime.operators.coordination.util;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.locks.ReentrantLock;
+
+import static org.apache.flink.util.Preconditions.checkState;
+
+/**
+ * This trackers remember the CompletableFutures if they are not complete normally. It also allows
Review comment:
```suggestion
* This tracker remembers the CompletableFutures if they are completed exceptionally. It also allows
```
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/util/IncompleteFuturesTracker.java
##########
@@ -108,4 +94,22 @@ void removeFromSet(CompletableFuture<?> future) {
lock.unlock();
}
}
+
+ @VisibleForTesting
+ Collection<CompletableFuture<?>> getCurrentIncomplete() {
Review comment:
```suggestion
Collection<CompletableFuture<?>> getCurrentIncompleteAndReset() {
```
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolderTest.java
##########
@@ -370,6 +373,82 @@ private void checkpointEventValueAtomicity(
}
}
+ @Test
+ public void testFailingCheckpointsIfSendingEventFailed() throws Exception {
+ CompletableFuture<Acknowledge> eventSendingResult = new CompletableFuture<>();
+ final EventReceivingTasks tasks =
+ EventReceivingTasks.createForRunningTasksWithRpcResult(eventSendingResult);
+ final OperatorCoordinatorHolder holder =
+ createCoordinatorHolder(tasks, TestingOperatorCoordinator::new);
+
+ // Send one event without finishing it.
+ getCoordinator(holder).getSubtaskGateway(0).sendEvent(new TestOperatorEvent(0));
+
+ // Triggers one checkpoint.
+ CompletableFuture<byte[]> checkpointResult = new CompletableFuture<>();
+ holder.checkpointCoordinator(1, checkpointResult);
+ getCoordinator(holder).getLastTriggeredCheckpoint().complete(new byte[0]);
+
+ // Fails the event sending.
+ eventSendingResult.completeExceptionally(new RuntimeException("Artificial"));
+
+ assertTrue(eventSendingResult.isCompletedExceptionally());
+ }
+
+ @Test
+ public void testFailingCheckpointIfFailedEventNotProcessed() throws Exception {
+ final ReorderableManualExecutorService executor = new ReorderableManualExecutorService();
+ final ComponentMainThreadExecutor mainThreadExecutor =
+ new ComponentMainThreadExecutorServiceAdapter(
+ (ScheduledExecutorService) executor, Thread.currentThread());
+
+ CompletableFuture<Acknowledge> eventSendingResult = new CompletableFuture<>();
+ final EventReceivingTasks tasks =
+ EventReceivingTasks.createForRunningTasksWithRpcResult(eventSendingResult);
+
+ final OperatorCoordinatorHolder holder =
+ createCoordinatorHolder(tasks, TestingOperatorCoordinator::new, mainThreadExecutor);
+
+ // Send one event without finishing it.
+ getCoordinator(holder).getSubtaskGateway(0).sendEvent(new TestOperatorEvent(0));
+ executor.triggerAll();
+
+ // Finish the event sending. This will insert one runnable that handle
+ // failed events to the executor. And we pending this runnable to
+ // simulates checkpoints triggered before the failure get processed.
+ executor.setPendingNewRunnables(true);
+ eventSendingResult.completeExceptionally(new RuntimeException("Artificial"));
+ executor.setPendingNewRunnables(false);
+
+ // Triggers one checkpoint.
+ CompletableFuture<byte[]> checkpointResult = new CompletableFuture<>();
+ holder.checkpointCoordinator(1, checkpointResult);
+ executor.triggerAll();
+ getCoordinator(holder).getLastTriggeredCheckpoint().complete(new byte[0]);
+ executor.triggerAll();
+
+ assertTrue(checkpointResult.isCompletedExceptionally());
+ }
+
+ @Test
+ public void testCheckpointSuccessAfterFailedEventProcessed() throws Exception {
+ final EventReceivingTasks tasks =
+ EventReceivingTasks.createForRunningTasksFailingRpcs(
+ new RuntimeException("Artificial"));
+ final OperatorCoordinatorHolder holder =
+ createCoordinatorHolder(tasks, TestingOperatorCoordinator::new);
+
+ // Send one event and finish it. This will also cause the failure get process immediately.
Review comment:
```suggestion
// Send one event and finish it. This will also process the failure immediately.
```
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolderTest.java
##########
@@ -446,6 +525,27 @@ public OperatorCoordinator create(OperatorCoordinator.Context context) {
return holder;
}
+ private static class ReorderableManualExecutorService
+ extends ManuallyTriggeredScheduledExecutorService {
+
+ private boolean pendingNewRunnables;
+
+ private final Queue<Runnable> pendingRunnables = new ArrayDeque<>();
+
+ public void setPendingNewRunnables(boolean pendingNewRunnables) {
Review comment:
Maybe a better name would be `ignoreExecuteCalls(boolean)` or so.
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/util/NonSuccessFuturesTrack.java
##########
@@ -0,0 +1,86 @@
+/*
+ * 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.runtime.operators.coordination.util;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.locks.ReentrantLock;
+
+import static org.apache.flink.util.Preconditions.checkState;
+
+/**
+ * This trackers remember the CompletableFutures if they are not complete normally. It also allows
+ * the callers to remove the failed ones after they have handled the future.
+ */
+public class NonSuccessFuturesTrack {
Review comment:
But I see why you have chosen `nonSuccess` because this either means incomplete or failed.
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolderTest.java
##########
@@ -370,6 +373,82 @@ private void checkpointEventValueAtomicity(
}
}
+ @Test
+ public void testFailingCheckpointsIfSendingEventFailed() throws Exception {
+ CompletableFuture<Acknowledge> eventSendingResult = new CompletableFuture<>();
+ final EventReceivingTasks tasks =
+ EventReceivingTasks.createForRunningTasksWithRpcResult(eventSendingResult);
+ final OperatorCoordinatorHolder holder =
+ createCoordinatorHolder(tasks, TestingOperatorCoordinator::new);
+
+ // Send one event without finishing it.
+ getCoordinator(holder).getSubtaskGateway(0).sendEvent(new TestOperatorEvent(0));
+
+ // Triggers one checkpoint.
+ CompletableFuture<byte[]> checkpointResult = new CompletableFuture<>();
+ holder.checkpointCoordinator(1, checkpointResult);
+ getCoordinator(holder).getLastTriggeredCheckpoint().complete(new byte[0]);
+
+ // Fails the event sending.
+ eventSendingResult.completeExceptionally(new RuntimeException("Artificial"));
+
+ assertTrue(eventSendingResult.isCompletedExceptionally());
+ }
Review comment:
Should the last assert be `assertTrue(checkpointResult.isCompletedExceptionally());`?
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/util/NonSuccessFuturesTrack.java
##########
@@ -0,0 +1,86 @@
+/*
+ * 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.runtime.operators.coordination.util;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.locks.ReentrantLock;
+
+import static org.apache.flink.util.Preconditions.checkState;
+
+/**
+ * This trackers remember the CompletableFutures if they are not complete normally. It also allows
+ * the callers to remove the failed ones after they have handled the future.
+ */
+public class NonSuccessFuturesTrack {
Review comment:
And we still have the `IncompleteFuturesTracker` in the code base.
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/util/NonSuccessFuturesTrack.java
##########
@@ -0,0 +1,86 @@
+/*
+ * 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.runtime.operators.coordination.util;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.locks.ReentrantLock;
+
+import static org.apache.flink.util.Preconditions.checkState;
+
+/**
+ * This trackers remember the CompletableFutures if they are not complete normally. It also allows
+ * the callers to remove the failed ones after they have handled the future.
Review comment:
```suggestion
* the callers to remove the failed futures.
```
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolderTest.java
##########
@@ -370,6 +373,82 @@ private void checkpointEventValueAtomicity(
}
}
+ @Test
+ public void testFailingCheckpointsIfSendingEventFailed() throws Exception {
Review comment:
```suggestion
public void testFailingCheckpointIfSendingEventFailed() throws Exception {
```
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/util/NonSuccessFuturesTrackerTest.java
##########
@@ -0,0 +1,105 @@
+/*
+ * 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.runtime.operators.coordination.util;
+
+import org.junit.Test;
+
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+
+import static org.hamcrest.Matchers.contains;
+import static org.hamcrest.Matchers.not;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+/** Unit tests for the {@link IncompleteFuturesTracker}. */
+public class NonSuccessFuturesTrackerTest {
Review comment:
```suggestion
public class NonSuccessFuturesTrackerTest extends TestLogger {
```
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolderTest.java
##########
@@ -446,6 +525,27 @@ public OperatorCoordinator create(OperatorCoordinator.Context context) {
return holder;
}
+ private static class ReorderableManualExecutorService
+ extends ManuallyTriggeredScheduledExecutorService {
+
+ private boolean pendingNewRunnables;
+
+ private final Queue<Runnable> pendingRunnables = new ArrayDeque<>();
+
+ public void setPendingNewRunnables(boolean pendingNewRunnables) {
+ this.pendingNewRunnables = pendingNewRunnables;
+ }
+
+ @Override
+ public void execute(@Nonnull Runnable command) {
+ if (pendingNewRunnables) {
+ pendingRunnables.add(command);
Review comment:
Will the `Runnables` in `pendingRunnables` ever be executed or will they simply be ignored?
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolderTest.java
##########
@@ -370,6 +373,82 @@ private void checkpointEventValueAtomicity(
}
}
+ @Test
+ public void testFailingCheckpointsIfSendingEventFailed() throws Exception {
+ CompletableFuture<Acknowledge> eventSendingResult = new CompletableFuture<>();
+ final EventReceivingTasks tasks =
+ EventReceivingTasks.createForRunningTasksWithRpcResult(eventSendingResult);
+ final OperatorCoordinatorHolder holder =
+ createCoordinatorHolder(tasks, TestingOperatorCoordinator::new);
+
+ // Send one event without finishing it.
+ getCoordinator(holder).getSubtaskGateway(0).sendEvent(new TestOperatorEvent(0));
+
+ // Triggers one checkpoint.
+ CompletableFuture<byte[]> checkpointResult = new CompletableFuture<>();
+ holder.checkpointCoordinator(1, checkpointResult);
+ getCoordinator(holder).getLastTriggeredCheckpoint().complete(new byte[0]);
+
+ // Fails the event sending.
+ eventSendingResult.completeExceptionally(new RuntimeException("Artificial"));
+
+ assertTrue(eventSendingResult.isCompletedExceptionally());
+ }
Review comment:
What exactly is this test testing? To me it looks as if we are sending an event, then trigger a checkpoint, complete this checkpoint, then fail the `eventSendingResult` and then assert that `eventSendingResult` was indeed completed exceptionally.
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolderTest.java
##########
@@ -370,6 +373,82 @@ private void checkpointEventValueAtomicity(
}
}
+ @Test
+ public void testFailingCheckpointsIfSendingEventFailed() throws Exception {
+ CompletableFuture<Acknowledge> eventSendingResult = new CompletableFuture<>();
+ final EventReceivingTasks tasks =
+ EventReceivingTasks.createForRunningTasksWithRpcResult(eventSendingResult);
+ final OperatorCoordinatorHolder holder =
+ createCoordinatorHolder(tasks, TestingOperatorCoordinator::new);
+
+ // Send one event without finishing it.
+ getCoordinator(holder).getSubtaskGateway(0).sendEvent(new TestOperatorEvent(0));
+
+ // Triggers one checkpoint.
+ CompletableFuture<byte[]> checkpointResult = new CompletableFuture<>();
+ holder.checkpointCoordinator(1, checkpointResult);
+ getCoordinator(holder).getLastTriggeredCheckpoint().complete(new byte[0]);
+
+ // Fails the event sending.
+ eventSendingResult.completeExceptionally(new RuntimeException("Artificial"));
+
+ assertTrue(eventSendingResult.isCompletedExceptionally());
+ }
+
+ @Test
+ public void testFailingCheckpointIfFailedEventNotProcessed() throws Exception {
+ final ReorderableManualExecutorService executor = new ReorderableManualExecutorService();
+ final ComponentMainThreadExecutor mainThreadExecutor =
+ new ComponentMainThreadExecutorServiceAdapter(
+ (ScheduledExecutorService) executor, Thread.currentThread());
+
+ CompletableFuture<Acknowledge> eventSendingResult = new CompletableFuture<>();
+ final EventReceivingTasks tasks =
+ EventReceivingTasks.createForRunningTasksWithRpcResult(eventSendingResult);
+
+ final OperatorCoordinatorHolder holder =
+ createCoordinatorHolder(tasks, TestingOperatorCoordinator::new, mainThreadExecutor);
+
+ // Send one event without finishing it.
+ getCoordinator(holder).getSubtaskGateway(0).sendEvent(new TestOperatorEvent(0));
+ executor.triggerAll();
+
+ // Finish the event sending. This will insert one runnable that handle
+ // failed events to the executor. And we pending this runnable to
Review comment:
What do you mean with "we pending this runnable"?
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/util/NonSuccessFuturesTrack.java
##########
@@ -0,0 +1,86 @@
+/*
+ * 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.runtime.operators.coordination.util;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.locks.ReentrantLock;
+
+import static org.apache.flink.util.Preconditions.checkState;
+
+/**
+ * This trackers remember the CompletableFutures if they are not complete normally. It also allows
+ * the callers to remove the failed ones after they have handled the future.
+ */
+public class NonSuccessFuturesTrack {
+
+ private final ReentrantLock lock = new ReentrantLock();
+
+ private final HashSet<CompletableFuture<?>> nonSuccessFutures = new HashSet<>();
+
+ public void trackFuture(CompletableFuture<?> future) {
+ if (future.isDone() && !future.isCompletedExceptionally()) {
+ return;
+ }
+
+ lock.lock();
+ try {
+ nonSuccessFutures.add(future);
+ } finally {
+ lock.unlock();
+ }
+
+ future.whenComplete(
+ (success, failure) -> {
+ if (failure == null) {
+ removeFromSet(future);
+ }
+ });
+ }
+
+ public Collection<CompletableFuture<?>> getNonSuccessFutures() {
+ lock.lock();
+ try {
+ if (nonSuccessFutures.isEmpty()) {
+ return Collections.emptySet();
+ }
+
+ return new ArrayList<>(nonSuccessFutures);
+ } finally {
+ lock.unlock();
+ }
+ }
+
+ public void removeFailedFuture(CompletableFuture<?> future) {
+ checkState(future.isCompletedExceptionally(), "The future is not fail");
Review comment:
```suggestion
checkArgument(future.isCompletedExceptionally(), "The future is not failed");
```
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/SubtaskGatewayImpl.java
##########
@@ -72,19 +79,28 @@
FutureUtils.assertNoException(
result.handleAsync(
(success, failure) -> {
- if (failure != null && subtaskAccess.isStillRunning()) {
- String msg =
- String.format(
- EVENT_LOSS_ERROR_MESSAGE,
- evt,
- subtaskAccess.subtaskName());
- subtaskAccess.triggerTaskFailover(new FlinkException(msg, failure));
+ if (failure != null) {
+ if (subtaskAccess.isStillRunning()) {
+ String msg =
+ String.format(
+ EVENT_LOSS_ERROR_MESSAGE,
+ evt,
+ subtaskAccess.subtaskName());
+ subtaskAccess.triggerTaskFailover(
+ new FlinkException(msg, failure));
+ }
+
+ nonSuccessFuturesTrack.removeFailedFuture(result);
Review comment:
I am wondering whether it wouldn't be simpler to change `result.handleAsync` to `result.whenAsync` and then to add the result of this operation to the `incompleteFuturesTracker`? That way we are sure that we will have handled the result before doing any other operations (e.g. failing/completing checkpoints).
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/util/NonSuccessFuturesTrack.java
##########
@@ -0,0 +1,86 @@
+/*
+ * 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.runtime.operators.coordination.util;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.locks.ReentrantLock;
+
+import static org.apache.flink.util.Preconditions.checkState;
+
+/**
+ * This trackers remember the CompletableFutures if they are not complete normally. It also allows
+ * the callers to remove the failed ones after they have handled the future.
+ */
+public class NonSuccessFuturesTrack {
Review comment:
```suggestion
public class NonSuccessFuturesTracker {
```
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolderTest.java
##########
@@ -370,6 +373,82 @@ private void checkpointEventValueAtomicity(
}
}
+ @Test
+ public void testFailingCheckpointsIfSendingEventFailed() throws Exception {
+ CompletableFuture<Acknowledge> eventSendingResult = new CompletableFuture<>();
+ final EventReceivingTasks tasks =
+ EventReceivingTasks.createForRunningTasksWithRpcResult(eventSendingResult);
+ final OperatorCoordinatorHolder holder =
+ createCoordinatorHolder(tasks, TestingOperatorCoordinator::new);
+
+ // Send one event without finishing it.
+ getCoordinator(holder).getSubtaskGateway(0).sendEvent(new TestOperatorEvent(0));
+
+ // Triggers one checkpoint.
+ CompletableFuture<byte[]> checkpointResult = new CompletableFuture<>();
+ holder.checkpointCoordinator(1, checkpointResult);
+ getCoordinator(holder).getLastTriggeredCheckpoint().complete(new byte[0]);
+
+ // Fails the event sending.
+ eventSendingResult.completeExceptionally(new RuntimeException("Artificial"));
+
+ assertTrue(eventSendingResult.isCompletedExceptionally());
+ }
+
+ @Test
+ public void testFailingCheckpointIfFailedEventNotProcessed() throws Exception {
+ final ReorderableManualExecutorService executor = new ReorderableManualExecutorService();
+ final ComponentMainThreadExecutor mainThreadExecutor =
+ new ComponentMainThreadExecutorServiceAdapter(
+ (ScheduledExecutorService) executor, Thread.currentThread());
+
+ CompletableFuture<Acknowledge> eventSendingResult = new CompletableFuture<>();
+ final EventReceivingTasks tasks =
+ EventReceivingTasks.createForRunningTasksWithRpcResult(eventSendingResult);
+
+ final OperatorCoordinatorHolder holder =
+ createCoordinatorHolder(tasks, TestingOperatorCoordinator::new, mainThreadExecutor);
+
+ // Send one event without finishing it.
+ getCoordinator(holder).getSubtaskGateway(0).sendEvent(new TestOperatorEvent(0));
+ executor.triggerAll();
+
+ // Finish the event sending. This will insert one runnable that handle
Review comment:
```suggestion
// Finish the event sending. This will insert one runnable that handles
```
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/util/NonSuccessFuturesTrack.java
##########
@@ -0,0 +1,86 @@
+/*
+ * 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.runtime.operators.coordination.util;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.locks.ReentrantLock;
+
+import static org.apache.flink.util.Preconditions.checkState;
+
+/**
+ * This trackers remember the CompletableFutures if they are not complete normally. It also allows
+ * the callers to remove the failed ones after they have handled the future.
+ */
+public class NonSuccessFuturesTrack {
Review comment:
Maybe call this class `IncompleteFuturesTracker` since it tracks futures until they are either successfully completed or until the failed futures are manually removed.
--
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
[GitHub] [flink] flinkbot edited a comment on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-876475935
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20187",
"triggerID" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"triggerType" : "PUSH"
}, {
"hash" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20190",
"triggerID" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"triggerType" : "PUSH"
}, {
"hash" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20203",
"triggerID" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"triggerType" : "PUSH"
}, {
"hash" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20209",
"triggerID" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"triggerType" : "PUSH"
}, {
"hash" : "ff669457be6d04cb4da6986015ff8852b146925d",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20261",
"triggerID" : "ff669457be6d04cb4da6986015ff8852b146925d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* ff669457be6d04cb4da6986015ff8852b146925d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20261)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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
[GitHub] [flink] flinkbot edited a comment on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-876475935
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20187",
"triggerID" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"triggerType" : "PUSH"
}, {
"hash" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20190",
"triggerID" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"triggerType" : "PUSH"
}, {
"hash" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* fa6a87a6d47d79d400ef4964b168e8a767c8bad0 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20190)
* 473db5d7954ebc197a64bb49d3b91d5c09d2c595 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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
[GitHub] [flink] tillrohrmann closed pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
tillrohrmann closed pull request #16432:
URL: https://github.com/apache/flink/pull/16432
--
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
[GitHub] [flink] gaoyunhaii commented on a change in pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
gaoyunhaii commented on a change in pull request #16432:
URL: https://github.com/apache/flink/pull/16432#discussion_r666644248
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolderTest.java
##########
@@ -446,6 +525,27 @@ public OperatorCoordinator create(OperatorCoordinator.Context context) {
return holder;
}
+ private static class ReorderableManualExecutorService
+ extends ManuallyTriggeredScheduledExecutorService {
+
+ private boolean pendingNewRunnables;
+
+ private final Queue<Runnable> pendingRunnables = new ArrayDeque<>();
+
+ public void setPendingNewRunnables(boolean pendingNewRunnables) {
+ this.pendingNewRunnables = pendingNewRunnables;
+ }
+
+ @Override
+ public void execute(@Nonnull Runnable command) {
+ if (pendingNewRunnables) {
+ pendingRunnables.add(command);
Review comment:
For the real case these `Runnables` would be executed finally, and here if they are executed would not change the result since we are testing the logic before they get executed. I think I could also finally execute these `Runnables` to be more consistent with the real case.
--
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
[GitHub] [flink] tillrohrmann commented on a change in pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on a change in pull request #16432:
URL: https://github.com/apache/flink/pull/16432#discussion_r667754578
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolderTest.java
##########
@@ -370,6 +373,70 @@ private void checkpointEventValueAtomicity(
}
}
+ @Test
+ public void testFailingCheckpointIfSendingEventFailedAfterTrigger() throws Exception {
+ CompletableFuture<Acknowledge> eventSendingResult = new CompletableFuture<>();
+ final EventReceivingTasks tasks =
+ EventReceivingTasks.createForRunningTasksWithRpcResult(eventSendingResult);
+ final OperatorCoordinatorHolder holder =
+ createCoordinatorHolder(tasks, TestingOperatorCoordinator::new);
+
+ // Send one event without finishing it.
+ getCoordinator(holder).getSubtaskGateway(0).sendEvent(new TestOperatorEvent(0));
+
+ // Triggers one checkpoint.
Review comment:
```suggestion
// Trigger one checkpoint.
```
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolderTest.java
##########
@@ -370,6 +373,70 @@ private void checkpointEventValueAtomicity(
}
}
+ @Test
+ public void testFailingCheckpointIfSendingEventFailedAfterTrigger() throws Exception {
+ CompletableFuture<Acknowledge> eventSendingResult = new CompletableFuture<>();
+ final EventReceivingTasks tasks =
+ EventReceivingTasks.createForRunningTasksWithRpcResult(eventSendingResult);
+ final OperatorCoordinatorHolder holder =
+ createCoordinatorHolder(tasks, TestingOperatorCoordinator::new);
+
+ // Send one event without finishing it.
+ getCoordinator(holder).getSubtaskGateway(0).sendEvent(new TestOperatorEvent(0));
+
+ // Triggers one checkpoint.
+ CompletableFuture<byte[]> checkpointResult = new CompletableFuture<>();
+ holder.checkpointCoordinator(1, checkpointResult);
+ getCoordinator(holder).getLastTriggeredCheckpoint().complete(new byte[0]);
+
+ // Fails the event sending.
Review comment:
```suggestion
// Fail the sent event.
```
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolderTest.java
##########
@@ -370,6 +373,70 @@ private void checkpointEventValueAtomicity(
}
}
+ @Test
+ public void testFailingCheckpointIfSendingEventFailedAfterTrigger() throws Exception {
+ CompletableFuture<Acknowledge> eventSendingResult = new CompletableFuture<>();
+ final EventReceivingTasks tasks =
+ EventReceivingTasks.createForRunningTasksWithRpcResult(eventSendingResult);
+ final OperatorCoordinatorHolder holder =
+ createCoordinatorHolder(tasks, TestingOperatorCoordinator::new);
+
+ // Send one event without finishing it.
+ getCoordinator(holder).getSubtaskGateway(0).sendEvent(new TestOperatorEvent(0));
+
+ // Triggers one checkpoint.
+ CompletableFuture<byte[]> checkpointResult = new CompletableFuture<>();
+ holder.checkpointCoordinator(1, checkpointResult);
+ getCoordinator(holder).getLastTriggeredCheckpoint().complete(new byte[0]);
+
+ // Fails the event sending.
+ eventSendingResult.completeExceptionally(new RuntimeException("Artificial"));
+
+ assertTrue(checkpointResult.isCompletedExceptionally());
+ }
+
+ @Test
+ public void testFailingCheckpointIfSendingEventFailedBeforeTrigger() throws Exception {
Review comment:
```suggestion
public void testCheckpointFailsIfSendingEventFailedBeforeTrigger() throws Exception {
```
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/SubtaskGatewayImpl.java
##########
@@ -80,11 +86,14 @@
subtaskAccess.subtaskName());
subtaskAccess.triggerTaskFailover(new FlinkException(msg, failure));
Review comment:
I think we should guard that this method does not throw an exception. If it does, then we should fail hard. This will ensure that we don't swallow this failure as a send event failure.
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolderTest.java
##########
@@ -370,6 +373,70 @@ private void checkpointEventValueAtomicity(
}
}
+ @Test
+ public void testFailingCheckpointIfSendingEventFailedAfterTrigger() throws Exception {
Review comment:
```suggestion
public void testCheckpointFailsIfSendingEventFailedAfterTrigger() throws Exception {
```
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/SubtaskGatewayImpl.java
##########
@@ -80,11 +86,14 @@
subtaskAccess.subtaskName());
subtaskAccess.triggerTaskFailover(new FlinkException(msg, failure));
Review comment:
Maybe we can add a util `Runnables.assertNoException(Runnable)` that calls the `FatalExitExceptionHandler.INSTANCE`.
--
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
[GitHub] [flink] gaoyunhaii commented on a change in pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
gaoyunhaii commented on a change in pull request #16432:
URL: https://github.com/apache/flink/pull/16432#discussion_r666644562
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorCoordinatorHolderTest.java
##########
@@ -446,6 +525,27 @@ public OperatorCoordinator create(OperatorCoordinator.Context context) {
return holder;
}
+ private static class ReorderableManualExecutorService
+ extends ManuallyTriggeredScheduledExecutorService {
+
+ private boolean pendingNewRunnables;
+
+ private final Queue<Runnable> pendingRunnables = new ArrayDeque<>();
+
+ public void setPendingNewRunnables(boolean pendingNewRunnables) {
Review comment:
Perhaps we change it to something like `delayNewRunnables`, and in the test we finally execute these `Runnables`?
--
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
[GitHub] [flink] tillrohrmann commented on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-877165059
@gaoyunhaii could you show me where exactly the deadlock will happen? I could not find based on your description. I think the checkpoint won't block the main thread.
--
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
[GitHub] [flink] gaoyunhaii commented on a change in pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
gaoyunhaii commented on a change in pull request #16432:
URL: https://github.com/apache/flink/pull/16432#discussion_r667895007
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/SubtaskGatewayImpl.java
##########
@@ -80,11 +86,14 @@
subtaskAccess.subtaskName());
subtaskAccess.triggerTaskFailover(new FlinkException(msg, failure));
Review comment:
Got that, we indeed should not leak the exception~ I added the util method and the check~
--
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
[GitHub] [flink] flinkbot edited a comment on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-876475935
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20187",
"triggerID" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"triggerType" : "PUSH"
}, {
"hash" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20190",
"triggerID" : "fa6a87a6d47d79d400ef4964b168e8a767c8bad0",
"triggerType" : "PUSH"
}, {
"hash" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20203",
"triggerID" : "473db5d7954ebc197a64bb49d3b91d5c09d2c595",
"triggerType" : "PUSH"
}, {
"hash" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20209",
"triggerID" : "1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 473db5d7954ebc197a64bb49d3b91d5c09d2c595 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20203)
* 1b3a0d615d4f69eafd023cb3a7dd6cd70e3d6673 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20209)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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
[GitHub] [flink] StephanEwen commented on a change in pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
StephanEwen commented on a change in pull request #16432:
URL: https://github.com/apache/flink/pull/16432#discussion_r667052349
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/SubtaskGatewayImpl.java
##########
@@ -72,19 +79,28 @@
FutureUtils.assertNoException(
result.handleAsync(
(success, failure) -> {
- if (failure != null && subtaskAccess.isStillRunning()) {
- String msg =
- String.format(
- EVENT_LOSS_ERROR_MESSAGE,
- evt,
- subtaskAccess.subtaskName());
- subtaskAccess.triggerTaskFailover(new FlinkException(msg, failure));
+ if (failure != null) {
+ if (subtaskAccess.isStillRunning()) {
+ String msg =
+ String.format(
+ EVENT_LOSS_ERROR_MESSAGE,
+ evt,
+ subtaskAccess.subtaskName());
+ subtaskAccess.triggerTaskFailover(
+ new FlinkException(msg, failure));
+ }
+
+ nonSuccessFuturesTrack.removeFailedFuture(result);
Review comment:
It doesn't block the main thread. It just creates a conjunct future of all pending event futures and chains the checkpoint completion to that future. That is all fully async.
--
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
[GitHub] [flink] StephanEwen commented on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
StephanEwen commented on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-878387975
+1 also from my side.
Fix looks good!
--
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
[GitHub] [flink] tillrohrmann commented on a change in pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on a change in pull request #16432:
URL: https://github.com/apache/flink/pull/16432#discussion_r666844488
##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/operators/coordination/SubtaskGatewayImpl.java
##########
@@ -72,19 +79,28 @@
FutureUtils.assertNoException(
result.handleAsync(
(success, failure) -> {
- if (failure != null && subtaskAccess.isStillRunning()) {
- String msg =
- String.format(
- EVENT_LOSS_ERROR_MESSAGE,
- evt,
- subtaskAccess.subtaskName());
- subtaskAccess.triggerTaskFailover(new FlinkException(msg, failure));
+ if (failure != null) {
+ if (subtaskAccess.isStillRunning()) {
+ String msg =
+ String.format(
+ EVENT_LOSS_ERROR_MESSAGE,
+ evt,
+ subtaskAccess.subtaskName());
+ subtaskAccess.triggerTaskFailover(
+ new FlinkException(msg, failure));
+ }
+
+ nonSuccessFuturesTrack.removeFailedFuture(result);
Review comment:
Hmm, let me check whether this is the case. If the checkpoint blocks the main thread, then this is another serious problem that should not happen.
--
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
[GitHub] [flink] StephanEwen commented on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
StephanEwen commented on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-877232161
I am taking a look here, would like to double check two things before going ahead with this.
--
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
[GitHub] [flink] flinkbot edited a comment on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-876475935
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20187",
"triggerID" : "3f92e0cf1c13240efad8e5227ec2eec55cf6028d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 3f92e0cf1c13240efad8e5227ec2eec55cf6028d Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20187)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@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
[GitHub] [flink] flinkbot edited a comment on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-876450302
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.
## Automated Checks
Last check on commit c874338c6b19d8939f21a4781661759bea5d8449 (Thu Sep 23 18:02:32 UTC 2021)
**Warnings:**
* No documentation files were touched! Remember to keep the Flink docs up to date!
<sub>Mention the bot in a comment to re-run the automated checks.</sub>
## Review Progress
* ❓ 1. The [description] looks good.
* ❓ 2. There is [consensus] that the contribution should go into to Flink.
* ❓ 3. Needs [attention] from.
* ❓ 4. The change fits into the overall [architecture].
* ❓ 5. Overall code [quality] is good.
Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
- `@flinkbot approve all` to approve all aspects
- `@flinkbot approve-until architecture` to approve everything until `architecture`
- `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
- `@flinkbot disapprove architecture` to remove an approval you gave earlier
</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
[GitHub] [flink] StephanEwen commented on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
StephanEwen commented on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-877346128
To re-summarize the failure cause:
A failed RPC (failed result future) leads to the failure of the checkpoint and triggers a task failure. Then the tracking structures are reset, assuming that the failure is taken care of.
However, because the task failure is processed asynchronously (enqueued in the scheduler mailbox), it is possible that some successive checkpoints complete before the task failure is handled. And that violates the assumption that once the RPC loss is detected, no further checkpoints may complete.
I don't fully understand how this PR fixes that. It looks like it tries to change a bit where failure notifications are set, and that in `completeCheckpointOnceEventsAreDone()` we don't clear the set of futures we (so that the failed future remains in there, blocking further checkpoints) and we rely on cleaning it in a different place. Especially this part looks suspect to me: Registering the future in the tracker asynchronously might mean it isn't even tracked when we make the decision whether the checkpoint can be confirmed:
```java
sendingExecutor.execute(
() -> {
nonSuccessFuturesTrack.trackFuture(result);
sender.sendEvent(sendAction, result);
});
```
### Alternative Solution
I think what @tillrohrmann suggested is the right direction: We really need to guarantee is that by the time the event-sending future that we track is failed (due to RPC loss), we have already marked the job as failed, so no other checkpoint can be triggered. So my proposal is to re-write the following section of the code:
*Existing Code*
Note how the `handleAsync` on the result future means that triggering the subtask failure happens only after the future is already complete and has unlocked the checkpoining.
```java
final Callable<CompletableFuture<Acknowledge>> sendAction =
subtaskAccess.createEventSendAction(serializedEvent);
final CompletableFuture<Acknowledge> result = new CompletableFuture<>();
FutureUtils.assertNoException(
result.handleAsync(
(success, failure) -> {
if (failure != null && subtaskAccess.isStillRunning()) {
String msg =
String.format(
EVENT_LOSS_ERROR_MESSAGE, evt, subtaskAccess.subtaskName());
subtaskAccess.triggerTaskFailover(new FlinkException(msg, failure));
}
return null;
},
sendingExecutor));
sendingExecutor.execute(() -> sender.sendEvent(sendAction, result));
return result;
```
*Changed Code*
Here, the future that is in the tracker is only complete once the subtask is marked as failed.
```java
final CompletableFuture<Acknowledge> sendResult = new CompletableFuture<>();
sendingExecutor.execute(() -> sender.sendEvent(sendAction, sendResult));
final CompletableFuture<Acknowledge> result =
sendResult.handleAsync(
(success, failure) -> {
if (failure != null && subtaskAccess.isStillRunning()) {
String msg =
String.format(
EVENT_LOSS_ERROR_MESSAGE, evt, subtaskAccess.subtaskName());
subtaskAccess.triggerTaskFailover(new FlinkException(msg, failure));
}
return success;
},
sendingExecutor);
incompleteFuturesTracker.trackFutureWhileIncomplete(result);
return result;
```
We do need to pass the incomplete futures tracker into the `SubtaskGatewayImpl`. But I think that is the only other change we need.
I would suggest to undo in particular the language changes, because they are not correct.
--
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
[GitHub] [flink] gaoyunhaii commented on pull request #16432: [FLINK-23233][runtime] Failing checkpoints before failover for failed events in OperatorCoordinator
Posted by GitBox <gi...@apache.org>.
gaoyunhaii commented on pull request #16432:
URL: https://github.com/apache/flink/pull/16432#issuecomment-876884430
Hi Till, very thanks for the review! I addressed the inline comments, and for another possible option I think it seems to might cause deadlock.
--
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