Durante o SST, meu diretório de dados se parece com isso (há um diretório oculto .sst
com xtrabackup
):
-rw-rw---- 1 vcap vcap 113 Apr 16 08:13 grastate.dat
-rw-rw---- 1 vcap vcap 265 Apr 16 08:13 gvwstate.dat
-rw-rw---- 1 vcap vcap 0 Apr 16 08:13 sst_in_progress
-rw------- 1 vcap vcap 536872232 Apr 16 08:29 galera.cache
-rw------- 1 vcap vcap 134217728 Apr 16 08:32 gcache.page.000000
-rw------- 1 vcap vcap 134217728 Apr 16 08:36 gcache.page.000001
-rw------- 1 vcap vcap 134217728 Apr 16 08:40 gcache.page.000002
-rw------- 1 vcap vcap 134217728 Apr 16 08:44 gcache.page.000003
-rw------- 1 vcap vcap 134217728 Apr 16 08:48 gcache.page.000004
-rw------- 1 vcap vcap 134217728 Apr 16 08:52 gcache.page.000005
-rw------- 1 vcap vcap 134217728 Apr 16 08:56 gcache.page.000006
-rw------- 1 vcap vcap 134217728 Apr 16 09:00 gcache.page.000007
-rw------- 1 vcap vcap 134217728 Apr 16 09:03 gcache.page.000008
-rw------- 1 vcap vcap 134217728 Apr 16 09:07 gcache.page.000009
-rw------- 1 vcap vcap 134217728 Apr 16 09:11 gcache.page.000010
-rw------- 1 vcap vcap 134217728 Apr 16 09:15 gcache.page.000011
-rw------- 1 vcap vcap 134217728 Apr 16 09:19 gcache.page.000012
-rw-r----- 1 vcap vcap 366 Apr 16 09:20 mysql-bin.000021
-rw-rw---- 1 vcap vcap 19 Apr 16 09:20 mysql-bin.index
-rw------- 1 vcap vcap 134217728 Apr 16 09:23 gcache.page.000013
-rw------- 1 vcap vcap 134217728 Apr 16 09:27 gcache.page.000014
-rw------- 1 vcap vcap 134217728 Apr 16 09:30 gcache.page.000015
-rw------- 1 vcap vcap 134217728 Apr 16 09:32 gcache.page.000016
Pelo que entendi, as gravações durante o SST são armazenadas nos gcache.page.0000*
arquivos. Isso está correto? Definimos o tamanho para max. 512 MB ( gcache.size
). O que acontece se atingirmos o máximo? Se durante SST 2 GB inseridos?
2018-04-16 8:29:00 140448739440384 [Note] WSREP: Created page /var/vcap/store/mysql/gcache.page.000000 of size 134217728 bytes
2018-04-16 8:32:54 140448739440384 [Note] WSREP: Created page /var/vcap/store/mysql/gcache.page.000001 of size 134217728 bytes
2018-04-16 8:36:48 140448739440384 [Note] WSREP: Created page /var/vcap/store/mysql/gcache.page.000002 of size 134217728 bytes
2018-04-16 8:40:41 140448739440384 [Note] WSREP: Created page /var/vcap/store/mysql/gcache.page.000003 of size 134217728 bytes
2018-04-16 8:44:33 140448739440384 [Note] WSREP: Created page /var/vcap/store/mysql/gcache.page.000004 of size 134217728 bytes
2018-04-16 8:48:26 140448739440384 [Note] WSREP: Created page /var/vcap/store/mysql/gcache.page.000005 of size 134217728 bytes
2018-04-16 8:52:19 140448739440384 [Note] WSREP: Created page /var/vcap/store/mysql/gcache.page.000006 of size 134217728 bytes
2018-04-16 8:56:12 140448739440384 [Note] WSREP: Created page /var/vcap/store/mysql/gcache.page.000007 of size 134217728 bytes
2018-04-16 9:00:05 140448739440384 [Note] WSREP: Created page /var/vcap/store/mysql/gcache.page.000008 of size 134217728 bytes
2018-04-16 9:03:57 140448739440384 [Note] WSREP: Created page /var/vcap/store/mysql/gcache.page.000009 of size 134217728 bytes
2018-04-16 9:07:50 140448739440384 [Note] WSREP: Created page /var/vcap/store/mysql/gcache.page.000010 of size 134217728 bytes
2018-04-16 9:11:42 140448739440384 [Note] WSREP: Created page /var/vcap/store/mysql/gcache.page.000011 of size 134217728 bytes
2018-04-16 9:15:34 140448739440384 [Note] WSREP: Created page /var/vcap/store/mysql/gcache.page.000012 of size 134217728 bytes
2018-04-16 9:19:33 140448739440384 [Note] WSREP: Created page /var/vcap/store/mysql/gcache.page.000013 of size 134217728 bytes
2018-04-16 9:23:23 140448739440384 [Note] WSREP: Created page /var/vcap/store/mysql/gcache.page.000014 of size 134217728 bytes
2018-04-16 9:27:02 140448739440384 [Note] WSREP: Created page /var/vcap/store/mysql/gcache.page.000015 of size 134217728 bytes
2018-04-16 9:30:40 140448739440384 [Note] WSREP: Created page /var/vcap/store/mysql/gcache.page.000016 of size 134217728 bytes
2018-04-16 9:34:18 140448739440384 [Note] WSREP: Created page /var/vcap/store/mysql/gcache.page.000017 of size 134217728 bytes
2018-04-16 9:34:58 140449443399552 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2018-04-16 9:35:07 140448383366912 [Note] WSREP: Deleted page /var/vcap/store/mysql/gcache.page.000000
2018-04-16 9:35:08 140448383366912 [Note] WSREP: Deleted page /var/vcap/store/mysql/gcache.page.000001
2018-04-16 9:35:09 140448383366912 [Note] WSREP: Deleted page /var/vcap/store/mysql/gcache.page.000002
2018-04-16 9:35:11 140448383366912 [Note] WSREP: Deleted page /var/vcap/store/mysql/gcache.page.000003
2018-04-16 9:35:12 140448383366912 [Note] WSREP: Deleted page /var/vcap/store/mysql/gcache.page.000004
2018-04-16 9:35:13 140448383366912 [Note] WSREP: Deleted page /var/vcap/store/mysql/gcache.page.000005
2018-04-16 9:35:15 140448383366912 [Note] WSREP: Deleted page /var/vcap/store/mysql/gcache.page.000006
2018-04-16 9:35:16 140448383366912 [Note] WSREP: Deleted page /var/vcap/store/mysql/gcache.page.000007
2018-04-16 9:35:17 140448383366912 [Note] WSREP: Deleted page /var/vcap/store/mysql/gcache.page.000008
2018-04-16 9:35:19 140448383366912 [Note] WSREP: Deleted page /var/vcap/store/mysql/gcache.page.000009
2018-04-16 9:35:20 140448383366912 [Note] WSREP: Deleted page /var/vcap/store/mysql/gcache.page.000010
2018-04-16 9:35:21 140448383366912 [Note] WSREP: Deleted page /var/vcap/store/mysql/gcache.page.000011
2018-04-16 9:35:22 140448383366912 [Note] WSREP: Deleted page /var/vcap/store/mysql/gcache.page.000012
2018-04-16 9:35:32 140448383366912 [Note] WSREP: Deleted page /var/vcap/store/mysql/gcache.page.000013
2018-04-16 9:35:45 140448383366912 [Note] WSREP: Deleted page /var/vcap/store/mysql/gcache.page.000014
2018-04-16 9:35:59 140448383366912 [Note] WSREP: Deleted page /var/vcap/store/mysql/gcache.page.000015
2018-04-16 9:36:13 140448383366912 [Note] WSREP: Deleted page /var/vcap/store/mysql/gcache.page.000016
2018-04-16 9:36:16 140448383366912 [Note] WSREP: Deleted page /var/vcap/store/mysql/gcache.page.000017
2018-04-16 9:36:27 140436269124352 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
2018-04-16 9:36:39 140588932401024 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2018-04-16 9:37:55 140579234867968 [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
Não,
gcache.size
só é relevante para o IST. O GCache não é usado para armazenar transações de entrada em um nó de junção durante o SST. O Gcache é usado para armazenar transações caso outro nó solicite uma transferência de estado. Se o GCache for grande o suficiente para conter todas as transações necessárias, isso permitirá um IST.As transações de entrada para um nó de junção durante o SST são armazenadas na fila de recebimento local (tamanho máximo controlado pela
gcs.recv_q_hard_limit
variável e tamanho atual visto na variável de statuswsrep_local_recv_queue
). Esta fila é independente degcache.size
.