Skip to content

Conversation

@NicoK
Copy link
Contributor

@NicoK NicoK commented Mar 16, 2018

What is the purpose of the change

This PR contains two commits trying to tackle FLINK-8941 (which I could not reproduce).

Brief change log

  • let SpanningRecordSerializationTest extend from TestLogger
  • use a TemporaryFolder in SpanningRecordSerializationTest for spilling files
  • make sure SpillingAdaptiveSpanningRecordDeserializer does not work on an existing file, e.g. from another instance running on the same machine - allow 10 retries with 20 random bytes file names and fail otherwise

Verifying this change

This change is already covered by existing tests, such as SpanningRecordSerializationTest.

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: yes (well, partly - the code around the actual serializers)
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, 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

Nico Kruber added 2 commits March 16, 2018 11:43
Although the spilling files were chosen with random names of 20 bytes, it could
rarely happen that these collide. In that case, have another try (at most 10) at
selecting a unique file name.
Copy link
Contributor

@pnowojski pnowojski left a comment

Choose a reason for hiding this comment

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

Collision on 20 length bytes? 255^20? Please replace

it could rarely happen

in the commit massage with more accurate statement:

it could never happen in this universe

Besides I do not see how any of those two commits could fix the reported problem :(

@tillrohrmann
Copy link
Contributor

tillrohrmann commented Mar 20, 2018

I agree with @pnowojski. To me it seems quite unlikely that randomString will generate collisions and, thus, this commit, should actually not fix the reported problem. I would be in favor of closing this PR and only commit 5086956 as a hotfix. What do you think @NicoK?

@NicoK
Copy link
Contributor Author

NicoK commented Mar 26, 2018

I'd actually like to keep this collision detection since it does not hurt although it may not fix the problem. Both commits are actually somewhat shots in the dark trying to tackle the original problem which I could not really explain otherwise.

@tillrohrmann
Copy link
Contributor

Alright. Thanks for your contribution @NicoK and the review @pnowojski. Merging this PR.

tillrohrmann pushed a commit to tillrohrmann/flink that referenced this pull request Mar 27, 2018
Although the spilling files were chosen with random names of 20 bytes, it could
rarely happen that these collide. In that case, have another try (at most 10) at
selecting a unique file name.

This closes apache#5709.
asfgit pushed a commit that referenced this pull request Mar 28, 2018
Although the spilling files were chosen with random names of 20 bytes, it could
rarely happen that these collide. In that case, have another try (at most 10) at
selecting a unique file name.

This closes #5709.
@asfgit asfgit closed this in a148492 Mar 28, 2018
sampathBhat pushed a commit to sampathBhat/flink that referenced this pull request Jul 26, 2018
Although the spilling files were chosen with random names of 20 bytes, it could
rarely happen that these collide. In that case, have another try (at most 10) at
selecting a unique file name.

This closes apache#5709.
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.

4 participants