A galera cluster of three nodes (g1, g2, g3). g2 and g3 has been shut down.
g1 (the first node) has been running standalone for some time. It has "safe_to_bootstrap: 1" in /var/lib/mysql/grastate.dat, and this is perfectly fine.
Now if g2 (the second node) is started, after being off for prolonged time, it will start SST from g1. That, in itself, is ok. The problem is: immediately, as soon as the SST starts, the "safe_to_bootstrap:" on g1 (the donor) will change to "0".
And I think it should not.
If there occurs some error during SST, g1 is still the one node to bootstrap cluster from (as g2 does not contain full data yet).
So the "safe_to_bootstrap:" should remain "1" on the standalone donor (g1) until the joiner (g2) is primary/synced. Only then should it be changed to "0" (and be "0" on both nodes, as long as both are running).