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-24488][connectors/kafka] KafkaRecordSerializationSchemaBuilder does not forward timestamp #17465

Merged
merged 1 commit into from
Oct 26, 2021

Conversation

xmarker
Copy link
Contributor

@xmarker xmarker commented Oct 13, 2021

What is the purpose of the change

Fix KafkaRecordSerializationSchemaBuilder does not forward timestamp issue

Brief change log

  • Correct KafkaRecordSerializationSchemaWrapper.serialize to use a with timestamp ProducerRecord construct
  • Add a unit test

Verifying this change

This change added tests and can be verified as follows:

  • Use KafkaRecordSerializationSchemaBuilderTest.testSerializeRecordWithTimestamp to test it

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 documented)

@flinkbot
Copy link
Collaborator

flinkbot commented Oct 13, 2021

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@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 def7ab0 (Wed Oct 13 15:35:46 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

@fapaul
Copy link

fapaul commented Oct 15, 2021

@xmarker thanks for your contribution. Overall the changes look good but can you fix the formatting issues?

You can run mvn spotless:apply to reformat the code. Currently, your submission fails on the CI.

@xmarker
Copy link
Contributor Author

xmarker commented Oct 15, 2021

@xmarker thanks for your contribution. Overall the changes look good but can you fix the formatting issues?

You can run mvn spotless:apply to reformat the code. Currently, your submission fails on the CI.

Think you for your reminder, I have run spotless and pushed again.

@fapaul
Copy link

fapaul commented Oct 19, 2021

@flinkbot run azure

@fapaul
Copy link

fapaul commented Oct 21, 2021

@xmarker can you rebase your changes on the latest master. Some tests seem to fail and I wonder if these instabilities are fixed on the latest master version.

@xmarker
Copy link
Contributor Author

xmarker commented Oct 21, 2021

@xmarker can you rebase your changes on the latest master. Some tests seem to fail and I wonder if these instabilities are fixed on the latest master version.

@xmarker xmarker closed this Oct 21, 2021
@xmarker xmarker reopened this Oct 21, 2021
@xmarker
Copy link
Contributor Author

xmarker commented Oct 21, 2021

@fapaul I have pushed with rebase , thinks for your review

@fapaul
Copy link

fapaul commented Oct 22, 2021

@xmarker can you have a look at the failing tests. I checked out your branch at it seems the KafkaSinkITCase is crash looping. It seems something with the timestamp conversion does not properly work.

@xmarker xmarker force-pushed the FLINK-24488 branch 2 times, most recently from dc5bcb8 to 915e5f9 Compare October 23, 2021 14:14
@xmarker
Copy link
Contributor Author

xmarker commented Oct 23, 2021

@fapaul I have debug KafkaSinkITCase on my computer , I found the failure cause was due to SinkWriter.timestamp() is a negative number, when kafka producer serialize the record throws a runtime exception, and then flink task failover repeatedly, now i have fixed it and run KafkaSinkITCase no problem anymore.

Copy link

@fapaul fapaul left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix the changes look good. 👍
Can you finally squash all your commits together? It will make merging the PR easier.

@xmarker
Copy link
Contributor Author

xmarker commented Oct 26, 2021

@fapaul OK,I squashed commits and pushed again.

@AHeise AHeise merged commit 0df9e1e into apache:master Oct 26, 2021
@AHeise
Copy link
Contributor

AHeise commented Oct 26, 2021

Thank you for your contribution! Could you please create a backport PR for 1.14?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants