8

Percona XtraDB Cluster (PXC) 節點離開太久後的惡搞法

 3 years ago
source link: https://blog.gslin.org/archives/2021/07/14/10238/percona-xtradb-cluster-pxc-%e7%af%80%e9%bb%9e%e9%9b%a2%e9%96%8b%e5%a4%aa%e4%b9%85%e5%be%8c%e7%9a%84%e6%83%a1%e6%90%9e%e6%b3%95/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Percona XtraDB Cluster (PXC) 節點離開太久後的惡搞法

Percona 的「How To Recover Percona XtraDB Cluster 5.7 Node Without SST」這邊看到的技巧,不過只能用在 5.7 版,不能用在 8.0 版。我猜這個方法也可以用在其他跑 Galera Cluster 的資料庫上...

維護一組 Percona XtraDB Cluster 時一個常見的問題是,當節點離線太久後有機會無法用 IST (Incremental State Transfer) 跟回來,也就是只要把先前還沒有同步的部份更新進資料庫的方法,這時候就會需要用 SST (State Snapshot Transfer),變成抓整個 full copy。

作者提出來的方法是基於 IST 的大小通常比較小,但 binlog 通常都留蠻久的,所以可以利用 binlog 來幫 IST。

方法是先把 Galara Cluster 關掉,用 MySQL 傳統的 replication 同步到一定程度後,再把 IST 相關的位置設定指到已經同步的位置,接著再把 Galara Cluster 接上去就可以恢復了。

這個方法是 5.7 版限定,因為 8.0 的年代沒辦法改 Galara Cluster 的 wsrep 位置資訊:

Unfortunately, a similar solution does not work with Percona XtraDB Cluster 8.0.x, due to the modified way wsrep positions are kept in the storage engine, hence the trick with updating grastate.dat does not work as expected there.

我覺得可能 Percona 之後會弄出 patch 讓使用者可以改...

Related

在 Percona XtraDB Cluster 裡使用 async replication 時人工 failover 的方式...

在使用 Galera Cluster 時還是可以架設一般的 slave server (Percona XtraDB Cluster 則是 Percona 對 Galera Cluster 的封裝),像是這樣的架構: 其中 node{1,2} 為 cluster,node3 則是傳統的 async replication,來源的 master 為 node1。 當 node1 掛掉時,我們沒辦法自動將 node3 的 master 從 node1 改指到 node2,因為 binlog 的位置不一定正確。 在「Changing an async slave of a PXC cluster to a new Master」則是提供如何人工用最簡單的方式介入。 主要是靠…

June 23, 2013

In "Computer"

Galera Cluster 不必要的 SST 行為的改善

Percona 的人解釋了 Galera Cluster 為什麼在某些情況下會需要 SST (整份重傳) 而不是 IST (傳最後造成差異的部分),以及開發商在 3.19 版對應的改進:「Galera Cache (gcache) is finally recoverable on restart」。 原因在於 IST 所需要的記錄會在重開機時消失,所以當其他節點加入時沒辦法給,只好給 SST: The DONOR node caches missing write-sets in Galera cache, but on restart this cache is wiped clean and restarted fresh. So the DONOR node doesn’t have a…

December 2, 2016

In "Computer"

Galera Cluster 3.x 的設定...

Percona XtraDB Cluster 5.6 用的是 Galera Cluster 3.x 的 patch,所以 Percona 的人寫了一篇介紹 3.x 有哪些設定:「New wsrep_provider_options in Galera 3.x and Percona XtraDB Cluster 5.6」。 看起來來比較有影響的是 gmcast.segment=0,用在跨機房之間的判斷。 看起來應該是同一個機房要設一樣的 gmcast.segment。這個值會用在兩個地方:第一個是跨 segment 的 replication 流量會試著盡可能小。第二個是同步時的 Donor 會優先選擇同機房的節點。 其他的用預設值應該就 okay...

November 27, 2013

In "Computer"

a611ee8db44c8d03a20edf0bf5a71d80?s=49&d=identicon&r=gAuthor Gea-Suan LinPosted on July 14, 2021Categories Computer, Database, Murmuring, MySQL, SoftwareTags binlog, cluster, database, db, galera, incremental, ist, percona, position, rdbms, replication, snapshot, sst, state, transfer, wsrep

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Comment

Name *

Email *

Website

Notify me of follow-up comments by email.

Notify me of new posts by email.

Post navigation


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK