Kafka lag with read_uncommitted isolation level.

huangapple go评论51阅读模式
英文:

Kafka lag with read_uncommitted isolation level

问题

未提交的记录在 Kafka 滞后中计算吗,如果消费者配置为仅读取已提交的记录?

我阅读了文档,但在那里没有找到答案。
https://kafka.apache.org/documentation/#basic_ops_consumer_lag

英文:

Are uncommitted records counted in kafka lag if the consumer is configured to read only committed records?

I read the documentation but didn't find the answer there
https://kafka.apache.org/documentation/#basic_ops_consumer_lag

答案1

得分: 1

如果您在不提交的情况下轮询和处理事件,那么滞后时间将保持或增加,具体取决于新产生的事件。所以,是的,滞后时间包括未提交的记录。

如果您指的是“未完成的事务”,那么我记得曾经有一个 bug,它总是使滞后时间非零(至少为一个),因为它在计算事务标记,而这些标记会被消费者自动丢弃。

英文:

If you poll and process an event without committing, then the lag will remain or increase, depending on new produced events. So, yes, lag includes uncommitted records.

If you're referring to unfinished transactions, then I recall there was a bug that always made lag be non-zero (at least one), as it was counting transaction markers, which are discarded automatically by the consumer.

huangapple
  • 本文由 发表于 2023年4月17日 20:06:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/76034990.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定