Coder Social home page Coder Social logo

Comments (1)

zhuchao941 avatar zhuchao941 commented on June 2, 2024
  1. 原生的全量同步逻辑实现,既不锁库也不锁表 就是普通的select语句查全表数据。如果数据量大于10000,则会通过线程池处理,线程数为核数。会按照单个任务获取10000条数据拆分。
    不过在数据量大的情况下,性能不好,一是存在深度分页问题,二是对于线程数的设置,并非cpu密集型任务,单纯用cpu核数感觉也缺乏考量
  2. 全量同步期间需要注意增量数据的处理,不然可能会丢失更新
  3. 我改造了源码,简单走了单线程的流式查询,也能满足大部分场景,且相对稳定,当然也存在流式查询的一些问题:比如更加需要重视增量数据的处理,长事务等
  4. 也可以考虑结合使用datax做离线的全量数据同步 + canal做增量数据同步,原理也是流式查询,不过做了任务拆分+并行化处理

from canal.

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.