Giter Club home page Giter Club logo

Comments (3)

sundy-li avatar sundy-li commented on July 19, 2024
  1. 如果做了副本, 写入到另外一个节点不会丢失
  2. 如果没有做副本,会丢失

其实是一个 取舍问题, loop 次数可以调大,也可以在写失败发送告警,用户可以自己去修改对应的策略

from clickhouse_sinker.

jsding avatar jsding commented on July 19, 2024

如果kafka设置手动commit offset就可以保证了。不然现在如果clickhouse集群停机维护,必然会出现后面的一个批次数据丢失的问题。

from clickhouse_sinker.

sundy-li avatar sundy-li commented on July 19, 2024

@jsding 现在sinker已经是优雅关闭了,所以每次关闭的时候 会commit最后一次offset。

你说的是 clickhouse停机维护,在不关闭sinker的情况下,如何保证一致性。 手动commit 是一个可行的方法,但是sarama库没有暴露 flushtoBroker 方法(你可以加一下就2行代码),然后在 LoopWrite 成功后,手动提交一下最后的offset。

from clickhouse_sinker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.