Possibly dead code in wsrep_recover()
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL patches by Codership |
New
|
Undecided
|
Teemu Ollakka | |||
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC | Status tracked in 5.6 | |||||
5.5 |
Won't Fix
|
Low
|
Unassigned | |||
5.6 |
Fix Released
|
Low
|
Kenn Takara |
Bug Description
The following code in wsrep_recover() is suspicious:
void wsrep_recover()
{
if (!memcmp(
local_seqno == -2)
{
char uuid_str[40];
wsrep_
WSREP_
return;
}
... /* Run the actual GTID recovery procedure */
}
It looks like the intention was to prevent running GTID recovery when both local_uuid and local_seqno got changed from their initial values via wsrep_start_
But the actual logic seems be the reverse: that code would be executed when local_uuid == WSREP_UUID_
However, local_seqno is initialized to WSREP_SEQNO_
Changed in codership-mysql: | |
assignee: | nobody → Teemu Ollakka (teemu-ollakka) |
Providing "--wsrep- start-position= '00000000- 0000-0000- 0000-0000000000 00:-2' --wsrep-recover" on command line triggers that path:
WSREP: Position 00000000- 0000-0000- 0000-0000000000 00:-2 given at startup, skipping position recovery
However, benefits/necessity of it are unclear.
Given, wsrep_recover() is called only when --wsrep-recover is used and position given with that doesn't change anything, the code seems
wsrep-start-
vestigial.
Also, if seqno is -1, whatever is provided by wsrep-start- position is not
considered either, instead values in grastate are used.