View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000075 | Pgpool-II | New feature | public | 2013-09-26 03:32 | 2013-10-07 11:01 |
| Reporter | serge.logvinov | Assigned To | t-ishii | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | open | ||
| Summary | 0000075: Do not find master_node if not needed | ||||
| Description | In master_slave mode do not find new master if standby is shutdown. diff pgpool-II-3.2.6/main.c pgpool-II-3.2.6/main.c.origin 1928,1935d1927 < else if (MASTER_SLAVE && !strcmp(pool_config->master_slave_sub_mode, MODE_STREAMREP) && < Req_info->kind == NODE_DOWN_REQUEST) < { < if (Req_info->master_node_id != node_id) < new_primary = Req_info->master_node_id; < else < new_primary = find_primary_node_repeatedly(); | ||||
| Tags | No tags attached. | ||||
|
|
Can you please send in context diff format (diff -c)? Also I noticed you should exchange main.c and main.c.origin because the diff looks a reverse one. |
|
|
Oh, sorry. diff -C 5 pgpool-II-3.2.6/main.c.origin pgpool-II-3.2.6/main.c *** pgpool-II-3.2.6/main.c.origin 2013-09-25 22:20:27.208175501 +0400 --- pgpool-II-3.2.6/main.c 2013-09-25 22:06:59.430109391 +0400 *************** *** 1923,1932 **** --- 1923,1940 ---- pool_error("failover_handler: wait() failed. reason:%s", strerror(errno)); #endif if (Req_info->kind == PROMOTE_NODE_REQUEST && VALID_BACKEND(node_id)) new_primary = node_id; + else if (MASTER_SLAVE && !strcmp(pool_config->master_slave_sub_mode, MODE_STREAMREP) && + Req_info->kind == NODE_DOWN_REQUEST) + { + if (Req_info->master_node_id != node_id) + new_primary = Req_info->master_node_id; + else + new_primary = find_primary_node_repeatedly(); + } else new_primary = find_primary_node_repeatedly(); /* * If follow_master_command is provided and in master/slave |
|
|
Req_info->master_node_id should be Req_info->primary_node_id. Beisdes this the patch looks good. Committed to master, 3.3, 3.2 and 3.1 stable branches. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2013-09-26 03:32 | serge.logvinov | New Issue | |
| 2013-09-26 07:55 | t-ishii | Note Added: 0000335 | |
| 2013-09-26 07:55 | t-ishii | Assigned To | => t-ishii |
| 2013-09-26 07:55 | t-ishii | Status | new => feedback |
| 2013-09-26 13:09 | serge.logvinov | Note Added: 0000336 | |
| 2013-09-26 13:09 | serge.logvinov | Status | feedback => assigned |
| 2013-10-07 10:41 | t-ishii | Note Added: 0000337 | |
| 2013-10-07 10:42 | t-ishii | Status | assigned => resolved |
| 2013-10-07 11:01 | t-ishii | Changeset attached | => pgpool2 master 80c70cae |
| 2013-10-07 11:01 | t-ishii | Changeset attached | => pgpool2 V3_1_STABLE 726f2478 |