Grastate should be zeroed only on Replication errors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC |
New
|
Undecided
|
Unassigned |
Bug Description
The grastate is zeroed (forcing SST without manual intervention) on almost any MySQL error. I submit that this is bad default behavior because any ungraceful mysqld exit will trigger SST. My understanding is that the zeroed grastate's primary use case is to auto-repair cluster nodes that have reached a clearly inconsistent state. As such, I think the *only* time the grastate should be zeroed is when an actual replication error (i.e., RBR apply error) happens.
To summarize:
SST-worthy:
- RBR apply error
- Innodb checksum error
- Anything that clearly indicates a node is inconsistent with the cluster
Not worthy of a SST:
- my.cnf configuration error
- mysqld crashes for some unrelated wsrep error (we should at least *try* an IST -- why assume it won't work?)
This is likely a duplicate of lp:1111706
However, before doing so, there is this question:
Would it be fine if there is an option which can be used to force
galera to not consider grastate.dat for that particular startup, thus
relying on co-ordinates of wsrep-recover only. (and grastate.dat
will be created subsequently by galera).
It can be like --skip-grastate and providing that option would
imply that DBA knows what he is doing when providing it.
So, this will mean that even if grastate.dat is corrupted, zeroed,
lost/deleted etc. a full SST can be avoided for that node upon
examination (examination to ensure that other things like RBR error etc.
are not there).