Merge branch '2.0' into develop

This commit is contained in:
Markus Makela
2016-09-12 09:39:26 +03:00
7 changed files with 33 additions and 26 deletions

View File

@ -55,7 +55,8 @@ and the table if they do not exist.
Allow previous master to be available even in case of stopped or misconfigured Allow previous master to be available even in case of stopped or misconfigured
replication. replication.
This feature is enabled by default. Starting from MaxScale 2.0.0 this feature is enabled by default. It is disabled
by default in MaxScale 1.4.3 and below.
This allows services that depend on master and slave roles to continue This allows services that depend on master and slave roles to continue
functioning as long as the master server is available. This is a situation functioning as long as the master server is available. This is a situation

View File

@ -11,6 +11,18 @@ of [2.0.0](./MaxScale-2.0.0-Release-Notes.md).
For any problems you encounter, please consider submitting a bug For any problems you encounter, please consider submitting a bug
report at [Jira](https://jira.mariadb.org). report at [Jira](https://jira.mariadb.org).
## Changed default values
### `strip_db_esc`
The service parameter [_strip_db_esc_](../Getting-Started/Configuration-Guide.md#strip_db_esc)
now defaults to true.
### `detect_stale_master`
The [stale master detection](../Monitors/MySQL-Monitor.md#detect_stale_master)
feature is now enabled by default.
## Updated Features ## Updated Features
### Starting MariaDB MaxScale ### Starting MariaDB MaxScale
@ -103,6 +115,7 @@ Please consult
[Here is a list of bugs fixed since the release of MaxScale 2.0.1.](https://jira.mariadb.org/issues/?jql=project%20%3D%20MXS%20AND%20issuetype%20%3D%20Bug%20AND%20status%20%3D%20Closed%20AND%20fixVersion%20in%20(2.0.0%2C%202.0.1)%20AND%20resolved%20%3E%3D%20-21d%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC) [Here is a list of bugs fixed since the release of MaxScale 2.0.1.](https://jira.mariadb.org/issues/?jql=project%20%3D%20MXS%20AND%20issuetype%20%3D%20Bug%20AND%20status%20%3D%20Closed%20AND%20fixVersion%20in%20(2.0.0%2C%202.0.1)%20AND%20resolved%20%3E%3D%20-21d%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC)
* [MXS-812](https://jira.mariadb.org/browse/MXS-812): Number of conns not matching number of operations
* [MXS-847](https://jira.mariadb.org/browse/MXS-847): server_down event is executed 8 times due to putting sever into maintenance mode * [MXS-847](https://jira.mariadb.org/browse/MXS-847): server_down event is executed 8 times due to putting sever into maintenance mode
* [MXS-845](https://jira.mariadb.org/browse/MXS-845): "Server down" event is re-triggered after maintenance mode is repeated * [MXS-845](https://jira.mariadb.org/browse/MXS-845): "Server down" event is re-triggered after maintenance mode is repeated
* [MXS-842](https://jira.mariadb.org/browse/MXS-842): Unexpected / undocumented behaviour when multiple available masters from mmmon monitor * [MXS-842](https://jira.mariadb.org/browse/MXS-842): Unexpected / undocumented behaviour when multiple available masters from mmmon monitor

View File

@ -4,7 +4,7 @@ After=network.target
[Service] [Service]
Type=forking Type=forking
Restart=on-abnormal Restart=on-abort
PIDFile=@MAXSCALE_VARDIR@/run/maxscale/maxscale.pid PIDFile=@MAXSCALE_VARDIR@/run/maxscale/maxscale.pid
ExecStartPre=/usr/bin/install -d @MAXSCALE_VARDIR@/run/maxscale -o maxscale -g maxscale ExecStartPre=/usr/bin/install -d @MAXSCALE_VARDIR@/run/maxscale -o maxscale -g maxscale
ExecStart=@CMAKE_INSTALL_PREFIX@/@MAXSCALE_BINDIR@/maxscale --user=maxscale ExecStart=@CMAKE_INSTALL_PREFIX@/@MAXSCALE_BINDIR@/maxscale --user=maxscale

View File

@ -143,7 +143,6 @@ server_free(SERVER *tofreeserver)
MXS_FREE(tofreeserver->protocol); MXS_FREE(tofreeserver->protocol);
MXS_FREE(tofreeserver->unique_name); MXS_FREE(tofreeserver->unique_name);
MXS_FREE(tofreeserver->server_string); MXS_FREE(tofreeserver->server_string);
MXS_FREE(tofreeserver->slaves);
server_parameter_free(tofreeserver->parameters); server_parameter_free(tofreeserver->parameters);
if (tofreeserver->persistent) if (tofreeserver->persistent)

View File

@ -406,14 +406,6 @@ typedef enum skygw_chk_t
lf->lf_name_suffix != NULL && \ lf->lf_name_suffix != NULL && \
lf->lf_full_file_name != NULL, \ lf->lf_full_file_name != NULL, \
"NULL in name variable\n"); \ "NULL in name variable\n"); \
ss_debug( \
(lf->lf_chk_top != CHK_NUM_LOGFILE || \
lf->lf_chk_tail != CHK_NUM_LOGFILE ? \
false : \
(lf->lf_filepath == NULL || \
lf->lf_name_prefix == NULL || \
lf->lf_name_suffix == NULL || \
lf->lf_full_file_name == NULL ? false : true));) \
} }
#define CHK_FILEWRITER(fwr) { \ #define CHK_FILEWRITER(fwr) { \

View File

@ -942,7 +942,7 @@ static void closeSession(ROUTER *instance, void *router_session)
} }
#endif #endif
/** Clean operation counter in bref and in SERVER */ /** Clean operation counter in bref and in SERVER */
while (BREF_IS_WAITING_RESULT(bref)) if (BREF_IS_WAITING_RESULT(bref))
{ {
bref_clear_state(bref, BREF_WAITING_RESULT); bref_clear_state(bref, BREF_WAITING_RESULT);
} }
@ -955,6 +955,10 @@ static void closeSession(ROUTER *instance, void *router_session)
/** decrease server current connection counters */ /** decrease server current connection counters */
atomic_add(&bref->bref_backend->backend_conn_count, -1); atomic_add(&bref->bref_backend->backend_conn_count, -1);
} }
else
{
ss_dassert(!BREF_IS_WAITING_RESULT(bref));
}
} }
/** Unlock */ /** Unlock */
rses_end_locked_router_action(router_cli_ses); rses_end_locked_router_action(router_cli_ses);
@ -2794,11 +2798,8 @@ static void bref_clear_state(backend_ref_t *bref, bref_state_t state)
MXS_ERROR("[%s] Error: NULL parameter.", __FUNCTION__); MXS_ERROR("[%s] Error: NULL parameter.", __FUNCTION__);
return; return;
} }
if (state != BREF_WAITING_RESULT)
{ if ((state & BREF_WAITING_RESULT) && (bref->bref_state & BREF_WAITING_RESULT))
bref->bref_state &= ~state;
}
else
{ {
int prev1; int prev1;
int prev2; int prev2;
@ -2823,6 +2824,8 @@ static void bref_clear_state(backend_ref_t *bref, bref_state_t state)
} }
} }
} }
bref->bref_state &= ~state;
} }
static void bref_set_state(backend_ref_t *bref, bref_state_t state) static void bref_set_state(backend_ref_t *bref, bref_state_t state)
@ -2832,11 +2835,8 @@ static void bref_set_state(backend_ref_t *bref, bref_state_t state)
MXS_ERROR("[%s] Error: NULL parameter.", __FUNCTION__); MXS_ERROR("[%s] Error: NULL parameter.", __FUNCTION__);
return; return;
} }
if (state != BREF_WAITING_RESULT)
{ if ((state & BREF_WAITING_RESULT) && (bref->bref_state & BREF_WAITING_RESULT) == 0)
bref->bref_state |= state;
}
else
{ {
int prev1; int prev1;
int prev2; int prev2;
@ -2862,6 +2862,8 @@ static void bref_set_state(backend_ref_t *bref, bref_state_t state)
bref->bref_backend->backend_server->port); bref->bref_backend->backend_server->port);
} }
} }
bref->bref_state |= state;
} }
/** /**