autopilotpattern / mysql

Implementation of the autopilot pattern for MySQL
Mozilla Public License 2.0
172 stars 68 forks source link

Replicas fail to initialise #22

Closed lguminski closed 8 years ago

lguminski commented 8 years ago

When many containers start at the same time, there is no backup yet (the freshly elected master hasn't created one yet), so replicas fail to initialise their databases, and never recover from the state.

tgross commented 8 years ago

@lguminski this is currently a design limitation. The leader election process happens in the health check, and we can't restore the snapshot once mysqld is running so it has to happen in the preStart. We might be able to change this by forcing a replica to poll/wait during preStart if a primary has been elected but there's no backup yet.

tgross commented 8 years ago

Closing in lieu of https://github.com/autopilotpattern/mysql/issues/29