Merge lp:~daniel-nichter/drizzle/fix-slave-reconnect-bug-956200 into lp:drizzle
Proposed by
Daniel Nichter
Status: | Work in progress | ||||||||
---|---|---|---|---|---|---|---|---|---|
Proposed branch: | lp:~daniel-nichter/drizzle/fix-slave-reconnect-bug-956200 | ||||||||
Merge into: | lp:drizzle | ||||||||
Diff against target: |
267 lines (+84/-65) 3 files modified
plugin/slave/queue_producer.cc (+55/-41) plugin/slave/queue_producer.h (+2/-2) plugin/slave/replication_slave.cc (+27/-22) |
||||||||
To merge this branch: | bzr merge lp:~daniel-nichter/drizzle/fix-slave-reconnect-bug-956200 | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
David Shrewsbury (community) | Disapprove | ||
Drizzle Trunk | Pending | ||
Review via email: mp+104046@code.launchpad.net |
Description of the change
Fixes bug 956200 (slave config file option max-reconnects doesn't work) and bug 956214 (slave doesn't set status to STOPPED after max-reconnecct failures).
To post a comment you must log in.
Unmerged revisions
- 2552. By Daniel Nichter
-
Add extra IO thread states: INITIALIZING, DISCONNECTED, RECONNECTING, CONNECTING, OK, STOPPED, ERROR. Change setIOState() params. Use C++ str instead of C str for err msg.
- 2551. By Daniel Nichter
-
Make status=STOPPED until IO thread connects. Set error_msg if all reconnects fail.
- 2550. By Daniel Nichter
-
Fix max-reconnects. Make seconds-
between- reconnects and io-thread-sleep per-master options.
Although I whole-heartedly agree with the changes you are trying to make, I think parts of it need reworked a bit.
We need to keep the concept of when a thread is actually alive (i.e., RUNNING) vs. when the thread has terminated (STOPPED). You've essentially redefined those states here, and that's the part I disagree with. What we need instead is to add additional thread states. E.g.,
* running and initializing (INITIALIZING). This would likely replace RUNNING.
* running and disconnected and will not attempt reconnect (DISCONNECTED)
* running and awaiting reconnect (RECONNECTING)
* running and connected normally (CONNECTED)
* running but in some awful error state (ERROR)
* thread has terminated normally (STOPPED)
* etc.
Something along those lines. Those states are just off the top of my head and I'm open to what is defined.
And although I was the one to move max-reconnects to each [masterN] section for some inexplicable reason, wouldn't we want the max-reconnect, seconds- between- reconnects, and io-thread-sleep values to be common values among all defined masters, rather than defined separately for each master?