亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
12下一頁
最近訪問板塊 發(fā)新帖
查看: 4194 | 回復(fù): 18
打印 上一主題 下一主題

關(guān)于Raplication之大惑 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2007-05-11 16:47 |只看該作者 |倒序?yàn)g覽
有Master-Slave結(jié)構(gòu)Mysql,以前一直同步正常。

最近經(jīng)常出現(xiàn)很怪異的問題:

mysql> show slave status\G
*************************** 1. row ***************************
             Slave_IO_State: Waiting for master to send event
                Master_Host: 192.168.1.1
                Master_User: dbuser
                Master_Port: 3306
              Connect_Retry: 60
            Master_Log_File: mysql-bin.000193
        Read_Master_Log_Pos: 257898263
             Relay_Log_File: Db-relay-bin.000601
              Relay_Log_Pos: 257898400
      Relay_Master_Log_File: mysql-bin.000193
           Slave_IO_Running: Yes
          Slave_SQL_Running: Yes
            Replicate_Do_DB:
        Replicate_Ignore_DB:
         Replicate_Do_Table:
     Replicate_Ignore_Table:
    Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
                 Last_Errno: 0
                 Last_Error:
               Skip_Counter: 0
        Exec_Master_Log_Pos: 257898263
            Relay_Log_Space: 257898400
            Until_Condition: None
             Until_Log_File:
              Until_Log_Pos: 0
         Master_SSL_Allowed: No
         Master_SSL_CA_File:
         Master_SSL_CA_Path:
            Master_SSL_Cert:
          Master_SSL_Cipher:
             Master_SSL_Key:
      Seconds_Behind_Master: 0
1 row in set (0.00 sec)

1秒種之后,再執(zhí)行show slave status\G,結(jié)果如下

mysql> show slave status\G
*************************** 1. row ***************************
             Slave_IO_State: Waiting for master to send event
                Master_Host: 192.168.1.1
                Master_User:dbuser
                Master_Port: 3306
              Connect_Retry: 60
            Master_Log_File: mysql-bin.000193
        Read_Master_Log_Pos: 257903732
             Relay_Log_File: Db-relay-bin.000601
              Relay_Log_Pos: 257901335
      Relay_Master_Log_File: mysql-bin.000193
           Slave_IO_Running: Yes
          Slave_SQL_Running: Yes
            Replicate_Do_DB:
        Replicate_Ignore_DB:
         Replicate_Do_Table:
     Replicate_Ignore_Table:
    Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
                 Last_Errno: 0
                 Last_Error:
               Skip_Counter: 0
        Exec_Master_Log_Pos: 257901198
            Relay_Log_Space: 257903869
            Until_Condition: None
             Until_Log_File:
              Until_Log_Pos: 0
         Master_SSL_Allowed: No
         Master_SSL_CA_File:
         Master_SSL_CA_Path:
            Master_SSL_Cert:
          Master_SSL_Cipher:
             Master_SSL_Key:
      Seconds_Behind_Master: 167
1 row in set (0.00 sec)

這也變的太快了吧?上一秒還是正常的,下一秒就落后Master服務(wù)器167秒了??

為什么會(huì)這樣?Seconds_Behind_Master的值是怎么計(jì)算出來的?

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2007-05-11 16:51 |只看該作者
你有my.cnf文件嗎?
我瞧瞧

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2007-05-11 16:54 |只看該作者
應(yīng)該是說master執(zhí)行的延遲,可能是你們的數(shù)據(jù)量太多了。

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2007-05-11 16:59 |只看該作者
原帖由 helbreathszw 于 2007-5-11 16:51 發(fā)表
你有my.cnf文件嗎?
我瞧瞧


master的還是slave的?

論壇徽章:
0
5 [報(bào)告]
發(fā)表于 2007-05-11 17:01 |只看該作者
你發(fā)我信箱好了szw2001@gmail.com
是master和slave的my.cnf,可能是你們做了什么delay延遲的

論壇徽章:
0
6 [報(bào)告]
發(fā)表于 2007-05-11 17:06 |只看該作者
原帖由 helbreathszw 于 2007-5-11 16:54 發(fā)表
應(yīng)該是說master執(zhí)行的延遲,可能是你們的數(shù)據(jù)量太多了。


數(shù)據(jù)量確實(shí)很大。

但讓人摸不到頭緒的是:上一秒執(zhí)行show slave status\G,顯示
      Seconds_Behind_Master: 0,也就是說,SLAVE與MASTER是即時(shí)同步的
僅僅過了一秒就
      Seconds_Behind_Master: 167,SLAVE上僅過了一秒,在MASTER上居然已經(jīng)過了167秒,顯得有點(diǎn)荒唐。

過幾秒又顯示為0……如此反復(fù),折騰死我了(有個(gè)定期的監(jiān)控腳本去檢查這個(gè)數(shù)值,高于15秒就會(huì)郵件短信一起來騷擾我)

      “Seconds_Behind_Master”這個(gè)值是怎么算出來的?太荒唐了。

補(bǔ)充下:兩臺(tái)機(jī)器曾經(jīng)在系統(tǒng)時(shí)間上相差了幾分鐘,但是后來用ntpdate校準(zhǔn)成一樣的了,這有可能是干擾因素嗎?

論壇徽章:
0
7 [報(bào)告]
發(fā)表于 2007-05-11 17:08 |只看該作者
`Slave_IO_State' and `Seconds_Behind_Master' columns to the
     output of `SHOW SLAVE STATUS'.  `Slave_IO_State' indicates the
     state of the slave I/O thread, and `Seconds_Behind_Master'
     indicates the number of seconds by which the slave is late
     compared to the master.

論壇徽章:
0
8 [報(bào)告]
發(fā)表于 2007-05-11 17:23 |只看該作者
原帖由 helbreathszw 于 2007-5-11 17:01 發(fā)表
你發(fā)我信箱好了
是master和slave的my.cnf,可能是你們做了什么delay延遲的


已發(fā),3Q

論壇徽章:
0
9 [報(bào)告]
發(fā)表于 2007-05-11 17:29 |只看該作者
原帖由 helbreathszw 于 2007-5-11 17:08 發(fā)表
`Slave_IO_State' and `Seconds_Behind_Master' columns to the
     output of `SHOW SLAVE STATUS'.  `Slave_IO_State' indicates the
     state of the slave I/O thread, and `Seconds_Behind_Master'
   ...


那Seconds_Behind_master這個(gè)值是怎么算的?
是當(dāng)前Master的時(shí)間與SLAVE正在處理的日志所處的時(shí)間的差嗎?
還是其它方法?

論壇徽章:
0
10 [報(bào)告]
發(fā)表于 2007-05-11 17:35 |只看該作者
Apparently on some systems tmp can be <0. Here are possible reasons
        related to MySQL:
        - the master is itself a slave of another master whose time is ahead.
        - somebody used an explicit SET TIMESTAMP on the master.
        Possible reason related to granularity-to-second of time functions
        (nothing to do with MySQL), which can explain a value of -1:
        assume the master's and slave's time are perfectly synchronized, and
        that at slave's connection time, when the master's timestamp is read,
        it is at the very end of second 1, and (a very short time later) when
        the slave's timestamp is read it is at the very beginning of second
        2. Then the recorded value for master is 1 and the recorded value for
        slave is 2. At SHOW SLAVE STATUS time, assume that the difference
        between timestamp of slave and rli->last_master_timestamp is 0
        (i.e. they are in the same second), then we get 0-(2-1)=-1 as a result.
        This confuses users, so we don't go below 0: hence the max().

        last_master_timestamp == 0 (an "impossible" timestamp 1970) is a
        special marker to say "consider we have caught up".
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP