On 2012-09-30 16:40, Henrik Ingo wrote:
> On Fri, Sep 28, 2012 at 4:54 PM, Alex Yurchenko
> <
alexey.y...@codership.com> wrote:
>> Yes, you're absolutely correct there. But I immediately have another
>> question: why do it manually when you can write a script?
>
> While I'm not the one with the original question, there are cases
> where manual copy over a media other than Ethernet (ie Fedex, etc) is
> the highest bandwidth option available. In my company it has been
> used
> to provision MySQL slaves - for real.
Makes perfect sense, indeed. I just got too focused on networking.
> Come to think of it, there could be a wsrep_sst_method=fedex script
> :-)
>
>> O, tempora! What? You people can't just try and see what happens?
>> Ok, can
>> tell you cause I tried and saw. No state transfer will happen -
>> neither SST
>> nor IST. But it is not in the spec, so this behavior should not be
>> relied
>> on. wsrep_sst_method=skip was invented to assemble _idle_ clusters
>> of the
>> nodes which are known to be identical. Because some users were
>> uncomfortab;e
>> with copying grastate.dat from node to node. Well, turns out it is
>> even
>> worse than copying grastate.dat, cause it requires an absolutely
>> idle
>> cluster.
>
> Now I'm curious. (And this is why I have stopped guessing, I've
> learned that Galera is usually more clever than I am...)
>
> I would have guessed that Galera first tries IST, and if it is not
> possible, then try full SST. ...which in this case is set to skip,
> but
> that wouldn't then affect the earlier IST attempt. Now it sounds like
> the opposite is true? What am I missing?
You're missing a whole lot ;)
To begin with, what do we need for IST on the joiner side? - Right, a
fully functional mysqld with storage engines initialized.
So when IST is not possible and we then need to do SST? - Right, we're
sadly out of luck, unless we use mysqldump.
So in Galera cluster you always do SST, joiner initializes storage
engines, and then IST. It's just that SST is trivial (that's what bypass
flag is for) when we can do IST (and vice versa).
So I guess that could explain, but...
The skip method... It actually goes against the above rule and uses a
magic code to not invoke ANY state transfer logic on the donor as well
as the joiner (it is also used for garbd joining the cluster)... I guess
"skip" is a bit of misnomer there, but that's all we could come up with.
Note that it would equally be a misnomer if we had an actual
wsrep_sst_skip script - what would be its purpose: we do IST if we can
and we skip SST if we can't do IST? Just return success? Why bother with
IST then? So, to be semantically consistent, wsrep_sst_method=skip skips
ANY sort of node provisioning. Node is assumed up-to-date and just joins
the cluster.
Regards,
Alex