Merge lp:~stewart/drizzle/replication-statuses into lp:drizzle/7.1

Proposed by Stewart Smith
Status: Merged
Approved by: Brian Aker
Approved revision: 2538
Merged at revision: 2541
Proposed branch: lp:~stewart/drizzle/replication-statuses
Merge into: lp:drizzle/7.1
Diff against target: 24 lines (+8/-0)
1 file modified
plugin/slave/queue_producer.cc (+8/-0)
To merge this branch: bzr merge lp:~stewart/drizzle/replication-statuses
Reviewer Review Type Date Requested Status
David Shrewsbury (community) Approve
Drizzle Trunk Pending
Review via email: mp+102021@code.launchpad.net

Description of the change

Provide information on what the io thread is doing r.e. connecting to master. This was one of the things that has tripped up several people (at least 2 at drizzle day) in setting up Drizzle replication.

To post a comment you must log in.
Revision history for this message
David Shrewsbury (dshrews) wrote :

Probably should make that _("Connecting..."), but otherwise looks good.

review: Approve
Revision history for this message
Vijay Samuel (vjsamuel) wrote :

Shouldn't this me merged into lp:drizzle?
On Apr 15, 2012 6:53 AM, "Stewart Smith" <email address hidden> wrote:

> Stewart Smith has proposed merging
> lp:~stewart/drizzle/replication-statuses into lp:drizzle/7.1.
>
> Requested reviews:
> Drizzle Trunk (drizzle-trunk)
>
> For more details, see:
>
> https://code.launchpad.net/~stewart/drizzle/replication-statuses/+merge/102021
>
> Provide information on what the io thread is doing r.e. connecting to
> master. This was one of the things that has tripped up several people (at
> least 2 at drizzle day) in setting up Drizzle replication.
> --
>
> https://code.launchpad.net/~stewart/drizzle/replication-statuses/+merge/102021
> Your team Drizzle Trunk is requested to review the proposed merge of
> lp:~stewart/drizzle/replication-statuses into lp:drizzle/7.1.
>
> === modified file 'plugin/slave/queue_producer.cc'
> --- plugin/slave/queue_producer.cc 2012-03-04 13:47:04 +0000
> +++ plugin/slave/queue_producer.cc 2012-04-15 01:22:18 +0000
> @@ -123,13 +123,21 @@
>
> uint32_t attempts= 1;
>
> + setIOState("Connecting...", true);
> +
> while (not openConnection())
> {
> + char buf[250];
> + snprintf(buf, sizeof(buf),_("Connection attempt %d of %d failed,
> sleeping for %d seconds and retrying. %s"), attempts, _max_reconnects,
> _seconds_between_reconnects, _last_error_message.c_str());
> +
> + setIOState(buf, true);
> if (attempts++ == _max_reconnects)
> break;
> boost::this_thread::sleep(duration);
> }
>
> + setIOState(_is_connected ? _("Connected") : _("Disconnected"), true);
> +
> return _is_connected;
> }
>
>
>
>

Revision history for this message
Stewart Smith (stewart) wrote :

> Shouldn't this me merged into lp:drizzle?

I'd like to have it go into 7.1, maybe we do a bugfix release.... this has tripped a good number of people up already.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugin/slave/queue_producer.cc'
2--- plugin/slave/queue_producer.cc 2012-03-04 13:47:04 +0000
3+++ plugin/slave/queue_producer.cc 2012-04-15 01:22:18 +0000
4@@ -123,13 +123,21 @@
5
6 uint32_t attempts= 1;
7
8+ setIOState("Connecting...", true);
9+
10 while (not openConnection())
11 {
12+ char buf[250];
13+ snprintf(buf, sizeof(buf),_("Connection attempt %d of %d failed, sleeping for %d seconds and retrying. %s"), attempts, _max_reconnects, _seconds_between_reconnects, _last_error_message.c_str());
14+
15+ setIOState(buf, true);
16 if (attempts++ == _max_reconnects)
17 break;
18 boost::this_thread::sleep(duration);
19 }
20
21+ setIOState(_is_connected ? _("Connected") : _("Disconnected"), true);
22+
23 return _is_connected;
24 }
25

Subscribers

People subscribed via source and target branches

to all changes: