Skip to content

Conversation

@Myasuka
Copy link
Member

@Myasuka Myasuka commented May 21, 2020

What is the purpose of the change

Increase the default value of state.backend.fs.memory-threshold from 1K to 20K as thread discussed.

Brief change log

  • Increase default size of 'state.backend.fs.memory-threshold' from 1k to 20k

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

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: yes
  • 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

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 67bc5db (Thu May 21 13:15:22 UTC 2020)

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 May 21, 2020

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

@Myasuka Myasuka force-pushed the increase-mem-threshold branch 4 times, most recently from 81a8f34 to 55c8d28 Compare May 22, 2020 06:14
@carp84 carp84 self-requested a review May 22, 2020 07:30
@Myasuka Myasuka force-pushed the increase-mem-threshold branch from 55c8d28 to adda0dd Compare May 22, 2020 10:36
@Myasuka Myasuka marked this pull request as ready for review May 23, 2020 03:29
@Myasuka
Copy link
Member Author

Myasuka commented May 23, 2020

My azure CI pipeline has run successfully twice: my-build-1 and my-build-2

Current CI in this PR failed due to FLINK-16572

@flinkbot run azure

Copy link
Member

@klion26 klion26 left a comment

Choose a reason for hiding this comment

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

@Myasuka thanks for your contribution, overall this LGTM, just has one minor question about the test case.

<td>The minimum size of state data files. All state chunks smaller than that are stored inline in the root checkpoint metadata file.</td>
<td style="word-wrap: break-word;">20 kb</td>
<td>MemorySize</td>
<td>The minimum size of state data files. All state chunks smaller than that are stored inline in the root checkpoint metadata file. The max memory threshold for this configuration is 1MB.</td>
Copy link
Member

Choose a reason for hiding this comment

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

Good to add the upper limit here 👍

final Path expectedCheckpointsPath = new Path(checkpointDir);
final Path expectedSavepointsPath = new Path(savepointDir);
final int threshold = 1000000;
final MemorySize threshold = MemorySize.parse("900kb");
Copy link
Member

Choose a reason for hiding this comment

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

Do you think we need to add a test case to verify the default value of state.backend.fs.memory-threshold(do not set this key, and verify the result of getMinFileSizeThreshold() is the expected value)

Copy link
Member Author

Choose a reason for hiding this comment

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

I think current test_get_min_file_size_threshold should already verify it.

@Myasuka
Copy link
Member Author

Myasuka commented May 25, 2020

Another successful run in my local branch: my-build

@Myasuka
Copy link
Member Author

Myasuka commented May 25, 2020

@flinkbot run azure

Copy link
Contributor

@StephanEwen StephanEwen left a comment

Choose a reason for hiding this comment

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

I wonder if we can avoid all the casts to int in the code. Especially before validating the value. Otherwise, we can get silent errors due to the downcast.

At the very least, we should use MathUtils.checkedDowncast.

@StephanEwen
Copy link
Contributor

Looks good to me, +1 to merge this

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.

+1. Thanks for the contribution @Myasuka !

Could you also submit a PR for release-1.11 as a double check against nightly run? Thanks.

@carp84
Copy link
Member

carp84 commented May 28, 2020

The e2e tests (#12373) for release-1.11 passed thus I will merge the changes. Thanks.

@carp84 carp84 closed this in a835f31 May 28, 2020
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