I think the check is correct. Everytime wsrep_desync is set 0 or 1, then wsrep->resync()/wsrep->desync() is called. However two consecutive wsrep->resync() calls usually succeed, two consecutive wsrep->desync() calls usually fail.
About the problem that 'set global wsrep_desync=ON/OFF' returns warnings "Truncated incorrect DOUBLE value: 'ON/OFF'", I think maybe mysql does not accept "ON/OFF" as boolean value(seems interpreted as double value). Instead I tried 'set global wsrep_desync=0/1', it works.
@Raghu
I think the check is correct. Everytime wsrep_desync is set 0 or 1, then wsrep-> resync( )/wsrep- >desync( ) is called. However two consecutive wsrep->resync() calls usually succeed, two consecutive wsrep->desync() calls usually fail.
About the problem that 'set global wsrep_desync= ON/OFF' returns warnings "Truncated incorrect DOUBLE value: 'ON/OFF'", I think maybe mysql does not accept "ON/OFF" as boolean value(seems interpreted as double value). Instead I tried 'set global wsrep_desync=0/1', it works.