Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-21132][runtime] Don't end input on stop with savepoint #14815

Merged
merged 5 commits into from
Feb 3, 2021

Conversation

rkhachatryan
Copy link
Contributor

@rkhachatryan rkhachatryan commented Jan 29, 2021

What is the purpose of the change

EndOfInput was used to handle any stopping of the job. When
stopping with savepoint the input is not actually ended.
This causes issues with some sinks (e.g. Iceberg).

With this change, endInput is not call for stop-with-savepoint.

To differentiate stop-with-savepoint from other cases
only checkpoint (RPC/barriers) are considered and not network EOP.
That's enough because EOP is only injected after the CP completion
(i.e. when the downstream is also notified by sync savepoint by CP
barriers).

Verifying this change

  • Added SavepointITCase (testStopSavepointWithBoundedInput, testStopSavepointWithBoundedInputConcurrently)
  • Added StreamTaskTest (testSyncSavepointAborted,testSyncSavepointAbortedAsync,testSyncSavepointCompleted)

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): yes (endInput is not called anymore for stop-with-savepoint)
  • 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/Mesos, 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? no

@flinkbot
Copy link
Collaborator

flinkbot commented Jan 29, 2021

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 0527a31 (Fri May 28 08:16:57 UTC 2021)

Warnings:

  • No documentation files were touched! Remember to keep the Flink docs up to date!

Mention the bot in a comment to re-run the automated checks.

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 for a full explanation of the review process.


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 Bot commands
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

@flinkbot
Copy link
Collaborator

flinkbot commented Jan 29, 2021

CI report:

Bot commands 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

@rkhachatryan
Copy link
Contributor Author

CI failure is unrelated (UnalignedCheckpointITCase.execute[Parallel cogroup, p = 10] ).

@flinkbot run azure

@rkhachatryan rkhachatryan marked this pull request as ready for review February 1, 2021 09:47
@rkhachatryan rkhachatryan changed the title [WIP] [FLINK-21132][runtime] Don't end input on stop with savepoint [FLINK-21132][runtime] Don't end input on stop with savepoint Feb 1, 2021
rkhachatryan and others added 3 commits February 3, 2021 00:34
EndOfInput was used to handle any stopping of the job. When
stopping with savepoint the input is not actually ended.
This causes issues with some sinks (e.g. Iceberg).

With this change, endInput is not call for stop-with-savepoint.

To differentiate stop-with-savepoint from other cases
only checkpoint (RPC/barriers) are considered and not network EOP.
That's enough because EOP is only injected after the CP completion
(i.e. when the downstream is also notified by sync savepoint by CP
barriers).
@pnowojski pnowojski merged commit 1c19ab7 into apache:master Feb 3, 2021
uce pushed a commit to uce/flink that referenced this pull request Feb 3, 2021
This code was copied from apache#14815 with
formatting changes to accomdate git am.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants