zoukankan      html  css  js  c++  java
  • MySQL主从不一致修复

    场景:

    线上正在服务的库由于紧急主从切换导致主从不一致,报错信息如下:

    Last_Error: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker 0 failed executing transaction '8fc8d9ac-a62b-11e6-a3ee-a4badb1b4a00:7649' at master log mysql-bin.000011, end_log_pos 5290535. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.

     

    出现这种错误如果少量的情况可以通过orc监控程序直接跳过

     

     

    手动跳过几次还可以,如果特别多的话就比较崩溃了,所以我们直接选择使用设置slave_exec_mode来处理,关于slave_exec_mode的介绍可以参考

    slave_exec_mode参数对主从复制的影响

     

    通过设置set global slave_exec_mode=IDEMPOTENT;等待从库和主库同步完成之后再把同步模式修改"严格模式"

    set global slave_exec_mode=stric;

     

     

  • 相关阅读:
    公用导航栏的根据url控制选中导航js
    页面切换出动晃动解决
    redis五大数据类型
    redis简介
    Linux安装redis
    各种锁的理解
    原子引用
    理解CAS
    彻底玩转单例模式
    Volatile
  • 原文地址:https://www.cnblogs.com/davygeek/p/7883593.html
Copyright © 2011-2022 走看看