Skip to content
代码片段 群组 项目
未验证 提交 6b95f1ec 编辑于 作者: Andre Araujo's avatar Andre Araujo 提交者: GitHub
浏览文件

KAFKA-10048: Possible data gap for a consumer after a failover when using MM2 (#8730)

Ensure that the MM2 checkpoint mirror task replicates consumer offsets even when they are
zero to avoid issues with consumers after failovers.

Author: Andre Araujo <asdaraujo@gmail.com>

Reviewers: Mickael Maison <mickael.maison@gmail.com>, Ryanne Dolan <ryannedolan@gmail.com>, Edoardo Comar <ecomar@uk.ibm.com>, heritamas
上级 ca559a2d
No related branches found
No related tags found
无相关合并请求
......@@ -168,7 +168,7 @@ public class MirrorCheckpointTask extends SourceTask {
return listConsumerGroupOffsets(group).entrySet().stream()
.filter(x -> shouldCheckpointTopic(x.getKey().topic()))
.map(x -> checkpoint(group, x.getKey(), x.getValue()))
.filter(x -> x.downstreamOffset() > 0) // ignore offsets we cannot translate accurately
.filter(x -> x.downstreamOffset() >= 0) // ignore offsets we cannot translate accurately
.collect(Collectors.toList());
}
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册