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-21935] Remove 'state.backend.async' option #15429

Closed
wants to merge 3 commits into from

Conversation

StephanEwen
Copy link
Contributor

What is the purpose of the change

Removes the state.backend.async option and makes all state snapshots asnchronous by default.

Brief change log

  • Removes the flag for async snapshots from the HashMapStateBackend and related examples and tests. This code was not released before, so this change is not breaking any backwards compatibility.
  • Ignores the flag for async snapshots in the MemoryStateBackend and FsStateBackend and always uses async snapshots. This change does not break any API. Methods and constructors are changed to ignore the flag, JavaDocs updated.
  • Deprecates the ConfigOption for state.backend.async.

Verifying this change

  • Existing tests are adjusted.

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/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? (not applicable)

@flinkbot
Copy link
Collaborator

flinkbot commented Mar 30, 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 0c7ab0b (Sat Aug 28 11:12:07 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 Mar 30, 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

@zentol zentol changed the title Remove 'state.backend.async' option [FLINK-21935] Remove 'state.backend.async' option Mar 30, 2021
@StephanEwen StephanEwen force-pushed the remove_async_option branch 2 times, most recently from de1587a to 489819d Compare March 30, 2021 15:20
@carp84 carp84 self-requested a review March 30, 2021 16:19
Copy link
Member

@Myasuka Myasuka left a comment

Choose a reason for hiding this comment

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

I think descriptions of MemoryStateBackend and FsStateBackend from state_backend.py should also be updated

…Backend.

Checkpoints are always asynchronous now.
MemoryStateBackend and FsStateBackend ignore the 'asyncSnapshots' parameter as well as the 'state.backend.async' option
and always use asynchronous snapshots now.

The 'state.backend.async' ConfigOption is deprecated and unused (removed from all tests).
@sjwiesman
Copy link
Contributor

@Myasuka I've updated the pydoc in state_backend.py in #15441

@StephanEwen
Copy link
Contributor Author

@sjwiesman From what I see, you updated the pydoc to mention that the old state backends are deprecated. I think @Myasuka was referring to update the docs that the async flag is no longer taking any effect and that snapshots are always asynchronous.

@Myasuka
Copy link
Member

Myasuka commented Mar 31, 2021

@sjwiesman Yes, what actually I meant is those pydoc about is_using_asynchronous_snapshots is actually out of date after this PR.

Copy link
Member

@carp84 carp84 left a comment

Choose a reason for hiding this comment

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

I suggest we also deprecate (or directly remove) NestedMapsStateTable and NestedStateMap classes since now there are actually no way to use them through any configuration setting, maybe deprecate first to reduce the changes this time.

@StephanEwen
Copy link
Contributor Author

@carp84 Yes, I would do this when removing the actual internal synchronous checkpointing code. There is even a bit more than those two classes. This first change is mainly to reduce API and config surface.

@StephanEwen
Copy link
Contributor Author

Merging this with an adjustment of the pydocs...

StephanEwen added a commit to StephanEwen/flink that referenced this pull request Mar 31, 2021
MemoryStateBackend and FsStateBackend ignore the 'asyncSnapshots' parameter as well as the 'state.backend.async' option
and always use asynchronous snapshots now.

The 'state.backend.async' ConfigOption is deprecated and unused (removed from all tests).

This closes apache#15429
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants