Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Docs indicate atomic_switch is autodetected #20

Closed
jnewland opened this Issue · 5 comments

3 participants

@jnewland

Docs:

Lhm chooses the strategy automatically based on the used MySQL server version, but you can override the behavior with an option.

Reality:

Using mysql 5.1.63-rel13.4-log. You must explicitly set options:atomic_switch

@grobie
Owner

That's because mysql version 5.1 is affected by the Mysql bug #39675. Have a look at the steps in the bug description to reproduce the behavior to see if you're really affected. In case you don't use replication at all, it's safe to use the atomic switcher, otherwise it's not. We (at SoundCloud) ran into this behavior during a production migration and it caused serious problems (downtime of 2 hours if I remember correctly).

Are you sure your version is not affected? Otherwise I think the current way to choose the strategy seems to be correct.

@jnewland

The bug is that the docs indicate that this is autodetected, but it's not. It's required to be manually set.

Thanks for this project! I'll definitely hacking on it some when I get a few spare cycled.

@grobie
Owner

I'll have a look at the implementation, but just to be sure: you're using mysql 5.1 and the automatically chosen strategy is locked_switcher? This would be correct. The atomic strategy can't be safely used with mysql 5.1

@jnewland

We're running 5.1. Reading the docs lead us to believe locked_switcher would be chosen automatically:

Lhm chooses the strategy automatically based on the used MySQL server version, but you can override the behavior with an option.

Rather, our migration failed and we were told to explicitly set the strategy.

@grobie
Owner

Got it. Thanks for the report, will have a look.

@lgierth lgierth closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.