Cannot recover when any changelog topic partition becomes empty (as a result of some retention policy)

未关闭
#597 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
30/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
kafka, python

调研方向

Start in faust/tables/recovery.py: the highwater and earliest-offset builders (around lines 387-404 and 655-713) and the standby consistency checks (around lines 492-526). Reproduce by recovering a changelog partition where low equals high, which makes high - 1 nonexistent. Done means recovery completes for both active and standby partitions on an empty changelog partition, with the consistency checks still valid after seeking.

由索引模型根据 Issue 内容生成。

描述

Checklist

  • I have included information about relevant versions
  • I have verified that the issue persists when using the master branch of Faust.

Steps to reproduce

  • if a topic partition is not empty: low watermark = minimum/earliest available offset, high watermark = maximum/latest available offset +1
  • if a topic partition is empty low watermark = high watermark

A changelog topic can become empty as a result of a Kafka cleanup policy (i.e., time/sized-based retention)
The case when the topic is empty is not handled properly in Faust recovery.

The recovery service needs to replay messages between low watermark (earliest offset) to high watermark - 1 (latest offset). Faust does this for the active and the standby partitions. Afterwards, it runs some consistency checks.

Active partitions

Let's start with the active partitions:

Standby partitions

Moreover, recovering standby partitions has a separate issue in the consistency checks. First, let's see what is the sequence of steps for active partitions such that we can draw a parallel.

Active:

Standby:

The problem is that after seeking the offsets may be updated asynchronously so by the time the consistency checks run they may no longer hold.

主要语言
Python
星标
1.9k
派生
205
平均合并
2 小时 2 分钟
30 天内合并 PR
1

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

faust-streaming/faust 的其他 Issue

查看 faust-streaming/faust 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。