lupins
V2EX  ›  数据库

mysql binlog 数据采集会不会影响半同步机制

  •  
  •   lupins · Oct 28, 2024 · 2600 views
    This topic created in 747 days ago, the information mentioned may be changed or developed.
    如题,mysql 主从使用半同步复制。使用 flink-cdc ,canal 等基于 binlog 的实时数据采集方案。如果采集工具先于所有备库返回 ack ,master 认为已经有 slave 落盘成功,但此时所有真正备库没有落盘;主如果 crash 掉了,此时主上已经提交的事务可能并没有传到从库上,如果此时,强行将从提升为主,可能导致新主上的数据不完整。
    5 replies  •  2024-10-28 17:33:43 +08:00
    lupins
    lupins
    OP
    Oct 28, 2024
    1
    求大佬解答
    wuyiccc
    wuyiccc
    Oct 28, 2024
    2
    canal 这种不会影响 mysql 的主从同步机制吧
    wps353
    wps353
    Oct 28, 2024
    3
    理论上会,不过你可以把采集放在 slave 上来规避一下。
    F281M6Dh8DXpD1g2
    F281M6Dh8DXpD1g2
    Oct 28, 2024
    4
    谁让你在主库上开 cdc 了
    sampeng
    sampeng
    Oct 28, 2024
    5
    在主库上开数据采集的一定是没过脑子的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2115 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 08:51 · PVG 16:51 · LAX 00:51 · JFK 03:51
    ♥ Do have faith in what you're doing.