Deprecate session specific log priorities
They are not particularly useful, they surely are not used and impose a small cost for every event extracted from the poll sets. This commit only removes the maxadmin commands, subsequent commits will remove the actual code.
This commit is contained in:
59
Documentation/Release-Notes/MaxScale-2.2.0-Release-Notes.md
Normal file
59
Documentation/Release-Notes/MaxScale-2.2.0-Release-Notes.md
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
# MariaDB MaxScale 2.2.0 Release Notes
|
||||||
|
|
||||||
|
Release 2.2.0 is a Beta release.
|
||||||
|
|
||||||
|
This document describes the changes in release 2.2.0, when compared to
|
||||||
|
release 2.1.X.
|
||||||
|
|
||||||
|
For any problems you encounter, please consider submitting a bug
|
||||||
|
report at [Jira](https://jira.mariadb.org).
|
||||||
|
|
||||||
|
## Changed Features
|
||||||
|
|
||||||
|
### Blah
|
||||||
|
|
||||||
|
## Dropped Features
|
||||||
|
|
||||||
|
### MaxAdmin
|
||||||
|
|
||||||
|
The following deprecated commands have been removed:
|
||||||
|
|
||||||
|
* `enable log [debug|trace|message]`
|
||||||
|
* `disable log [debug|trace|message]`
|
||||||
|
* `enable sessionlog [debug|trace|message]`
|
||||||
|
* `disable sessionlog [debug|trace|message]`
|
||||||
|
|
||||||
|
The following commands have been deprecated:
|
||||||
|
|
||||||
|
* `enable sessionlog-priority <session-id> [debug|info|notice|warning]`
|
||||||
|
* `disable sessionlog-priority <session-id> [debug|info|notice|warning]`
|
||||||
|
|
||||||
|
The commands can be issued, but have no effect.
|
||||||
|
|
||||||
|
## New Features
|
||||||
|
|
||||||
|
### Blah
|
||||||
|
|
||||||
|
## Bug fixes
|
||||||
|
|
||||||
|
[Here is a list of bugs fixed since the release of MaxScale 2.1.X.]()
|
||||||
|
|
||||||
|
## Known Issues and Limitations
|
||||||
|
|
||||||
|
There are some limitations and known issues within this version of MaxScale.
|
||||||
|
For more information, please refer to the [Limitations](../About/Limitations.md) document.
|
||||||
|
|
||||||
|
## Packaging
|
||||||
|
|
||||||
|
RPM and Debian packages are provided for the Linux distributions supported
|
||||||
|
by MariaDB Enterprise.
|
||||||
|
|
||||||
|
Packages can be downloaded [here](https://mariadb.com/resources/downloads).
|
||||||
|
|
||||||
|
## Source Code
|
||||||
|
|
||||||
|
The source code of MaxScale is tagged at GitHub with a tag, which is identical
|
||||||
|
with the version of MaxScale. For instance, the tag of version X.Y.Z of MaxScale
|
||||||
|
is X.Y.Z. Further, *master* always refers to the latest released non-beta version.
|
||||||
|
|
||||||
|
The source code is available [here](https://github.com/mariadb-corporation/MaxScale).
|
@ -646,9 +646,9 @@ struct subcommand enableoptions[] =
|
|||||||
"sessionlog-priority",
|
"sessionlog-priority",
|
||||||
2, 2,
|
2, 2,
|
||||||
enable_sess_log_priority,
|
enable_sess_log_priority,
|
||||||
"Enable a logging priority for a session",
|
"[Deprecated] Enable a logging priority for a session",
|
||||||
"Usage: enable sessionlog-priority [err | warning | notice | info | debug] <session id>"
|
"Usage: enable sessionlog-priority [err | warning | notice | info | debug] <session id>"
|
||||||
"message | debug] <session id>\t E.g. enable sessionlog-priority info 123.",
|
"\t E.g. enable sessionlog-priority info 123.",
|
||||||
{ARG_TYPE_STRING, ARG_TYPE_STRING, 0}
|
{ARG_TYPE_STRING, ARG_TYPE_STRING, 0}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -717,9 +717,9 @@ struct subcommand disableoptions[] =
|
|||||||
"sessionlog-priority",
|
"sessionlog-priority",
|
||||||
2, 2,
|
2, 2,
|
||||||
disable_sess_log_priority,
|
disable_sess_log_priority,
|
||||||
"Disable a logging priority for a particular session",
|
"[Deprecated] Disable a logging priority for a particular session",
|
||||||
"Usage: disable sessionlog-priority [err | warning | notice | info | debug] <session id>"
|
"Usage: disable sessionlog-priority [err | warning | notice | info | debug] <session id>"
|
||||||
"message | debug] <session id>\t E.g. enable sessionlog-priority info 123",
|
"\t E.g. enable sessionlog-priority info 123",
|
||||||
{ARG_TYPE_STRING, ARG_TYPE_STRING, 0}
|
{ARG_TYPE_STRING, ARG_TYPE_STRING, 0}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2050,30 +2050,6 @@ struct log_action_entry
|
|||||||
const char* replacement;
|
const char* replacement;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool seslog_cb(DCB *dcb, void *data)
|
|
||||||
{
|
|
||||||
bool rval = true;
|
|
||||||
struct log_action_entry *entry = ((void**)data)[0];
|
|
||||||
size_t *id = ((void**)data)[1];
|
|
||||||
bool enable = (bool)((void**)data)[2];
|
|
||||||
MXS_SESSION *session = dcb->session;
|
|
||||||
|
|
||||||
if (session->ses_id == *id)
|
|
||||||
{
|
|
||||||
if (enable)
|
|
||||||
{
|
|
||||||
session_enable_log_priority(session, entry->priority);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
session_disable_log_priority(session, entry->priority);
|
|
||||||
}
|
|
||||||
rval = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return rval;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct log_priority_entry
|
struct log_priority_entry
|
||||||
{
|
{
|
||||||
const char* name;
|
const char* name;
|
||||||
@ -2111,30 +2087,6 @@ static int string_to_priority(const char* name)
|
|||||||
return result ? result->priority : -1;
|
return result ? result->priority : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool sesprio_cb(DCB *dcb, void *data)
|
|
||||||
{
|
|
||||||
bool rval = true;
|
|
||||||
int *priority = ((void**)data)[0];
|
|
||||||
size_t *id = ((void**)data)[1];
|
|
||||||
bool enable = (bool)((void**)data)[2];
|
|
||||||
MXS_SESSION *session = dcb->session;
|
|
||||||
|
|
||||||
if (session->ses_id == *id)
|
|
||||||
{
|
|
||||||
if (enable)
|
|
||||||
{
|
|
||||||
session_enable_log_priority(session, *priority);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
session_disable_log_priority(session, *priority);
|
|
||||||
}
|
|
||||||
rval = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return rval;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enables a log priority for a single session
|
* Enables a log priority for a single session
|
||||||
* @param session The session in question
|
* @param session The session in question
|
||||||
@ -2143,22 +2095,7 @@ bool sesprio_cb(DCB *dcb, void *data)
|
|||||||
*/
|
*/
|
||||||
static void enable_sess_log_priority(DCB *dcb, char *arg1, char *arg2)
|
static void enable_sess_log_priority(DCB *dcb, char *arg1, char *arg2)
|
||||||
{
|
{
|
||||||
int priority = string_to_priority(arg1);
|
MXS_WARNING("'enable sessionlog-priority' is deprecated.");
|
||||||
|
|
||||||
if (priority != -1)
|
|
||||||
{
|
|
||||||
size_t id = (size_t) strtol(arg2, NULL, 10);
|
|
||||||
void *data[] = {&priority, &id, (void*)true};
|
|
||||||
|
|
||||||
if (dcb_foreach(sesprio_cb, data))
|
|
||||||
{
|
|
||||||
dcb_printf(dcb, "Session not found: %s.\n", arg2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dcb_printf(dcb, "'%s' is not a supported log priority.\n", arg1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2169,22 +2106,7 @@ static void enable_sess_log_priority(DCB *dcb, char *arg1, char *arg2)
|
|||||||
*/
|
*/
|
||||||
static void disable_sess_log_priority(DCB *dcb, char *arg1, char *arg2)
|
static void disable_sess_log_priority(DCB *dcb, char *arg1, char *arg2)
|
||||||
{
|
{
|
||||||
int priority = string_to_priority(arg1);
|
MXS_WARNING("'disable sessionlog-priority' is deprecated.");
|
||||||
|
|
||||||
if (priority != -1)
|
|
||||||
{
|
|
||||||
size_t id = (size_t) strtol(arg2, NULL, 10);
|
|
||||||
void *data[] = {&priority, &id, (void*)false};
|
|
||||||
|
|
||||||
if (dcb_foreach(seslog_cb, data))
|
|
||||||
{
|
|
||||||
dcb_printf(dcb, "Session not found: %s.\n", arg2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dcb_printf(dcb, "'%s' is not a supported log priority.\n", arg1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user