[FLINK-33231] [source] Properly evict offsetsToCommit cache on checkpoint complete if no offsets exist

Prior to this fix, if the offsets to commit for a given checkpoint is empty,
which can be the case if no starting offsets were retrieved from Kafka yet,
then on checkpoint completion the cache is not properly evicted up to the
given checkpoint.

This change fixes this such that in notifyOnCheckpointComplete, we shortcut
the method execution to not need to try to commit the offsets since its
empty anyways, and always remember to evict the cache up to the completed
checkpoint.
2 files changed
tree: 048f9723f1d3f661f844bcab47ebd444bd638984
  1. .github/
  2. .idea/
  3. docs/
  4. flink-connector-kafka/
  5. flink-connector-kafka-e2e-tests/
  6. flink-sql-connector-kafka/
  7. tools/
  8. .asf.yaml
  9. .gitignore
  10. .gitmodules
  11. LICENSE
  12. NOTICE
  13. pom.xml
  14. README.md
README.md

Apache Flink Kafka Connector

This repository contains the official Apache Flink Kafka connector.

Apache Flink

Apache Flink is an open source stream processing framework with powerful stream- and batch-processing capabilities.

Learn more about Flink at https://flink.apache.org/

Building the Apache Flink Kafka Connector from Source

Prerequisites:

  • Unix-like environment (we use Linux, Mac OS X)
  • Git
  • Maven (we recommend version 3.8.6)
  • Java 11
git clone https://github.com/apache/flink-connector-kafka.git
cd flink-connector-kafka
mvn clean package -DskipTests

The resulting jars can be found in the target directory of the respective module.

Developing Flink

The Flink committers use IntelliJ IDEA to develop the Flink codebase. We recommend IntelliJ IDEA for developing projects that involve Scala code.

Minimal requirements for an IDE are:

  • Support for Java and Scala (also mixed projects)
  • Support for Maven with Java and Scala

IntelliJ IDEA

The IntelliJ IDE supports Maven out of the box and offers a plugin for Scala development.

Check out our Setting up IntelliJ guide for details.

Support

Don’t hesitate to ask!

Contact the developers and community on the mailing lists if you need any help.

Open an issue if you found a bug in Flink.

Documentation

The documentation of Apache Flink is located on the website: https://flink.apache.org or in the docs/ directory of the source code.

Fork and Contribute

This is an active open-source project. We are always open to people who want to use the system or contribute to it. Contact us if you are looking for implementation tasks that fit your skills. This article describes how to contribute to Apache Flink.

About

Apache Flink is an open source project of The Apache Software Foundation (ASF). The Apache Flink project originated from the Stratosphere research project.