Commit Graph

585 Commits

Author SHA1 Message Date
111693775b master_id and node_id are long vars
master_id and node_id are long vars
2014-06-27 14:21:12 +02:00
380f5b6bf3 Merge branch 'develop' into MAX-59 2014-06-27 13:58:12 +02:00
4f12e123c5 Removed SERVER parameter from dcb_call_foreach
Removed SERVER parameter from dcb_call_foreach
2014-06-27 13:51:40 +02:00
eee2ad7143 Merge branch 'develop' into MAX-90
Conflicts:
	server/core/service.c
2014-06-27 12:15:30 +01:00
25d4f784bc Implementation of server routing generic functionality and for readconnrouter 2014-06-27 12:07:47 +01:00
237bacd131 Merge branch 'develop' into MAX-59 2014-06-27 11:07:55 +02:00
de5d4fda8b Merge of new user interface changes 2014-06-27 09:57:39 +01:00
20637ee224 Removed unnecessary SERVER pointer from dcb.c:dcb_call_foreach(), changed declaration and call accordingly. 2014-06-27 10:54:11 +03:00
ace2550d93 Merge branch 'develop' into MAX-111 2014-06-26 16:52:57 +01:00
f96b762478 User interface improvements
Addition of enable/disable heartbeat, enable/disable root, list monitors,
show monitors

Better filter diagnostic output
2014-06-26 16:46:19 +01:00
1a33277f72 Merge from develop
Merge from develop
2014-06-26 17:08:21 +02:00
4d2e43a2d9 code cleanup and documentation
code cleanup and documentation
2014-06-26 16:56:21 +02:00
1d1da398d4 Merge branch 'develop' into MAX-99
Conflicts:
	server/modules/routing/readwritesplit/readwritesplit.c
2014-06-25 17:50:29 +03:00
c30e270768 Removed dcb->command from DCB structure as it was used for session commands but not anymore.
Corrected debug assertion in dcb_final_free because DCB can be freed also when DCB is being created, that is, state is DCB_STATE_ALLOC.
2014-06-24 21:56:15 +03:00
442ac7fefb Added GWBUF type GWBUF_TYPE_SINGLE_STMT to indicate that buffer only includes single complete stmt. Added macro for checking the flag and changed existing routines as necessary. 2014-06-24 21:51:54 +03:00
a652e875b5 Support for multipacket statements
Remove double free in cloned DCB's
2014-06-24 17:59:29 +01:00
e1e172fe03 Fixed compile errors
Fixed compile errors
2014-06-24 18:37:17 +02:00
dfe3092dc5 Merge branch 'develop' into MAX-59 2014-06-24 18:21:09 +02:00
d42469c6cc Merge branch 'develop' into MAX-59 2014-06-23 12:42:32 +02:00
e650930487 Cleanup up branch session on close. 2014-06-23 10:10:04 +01:00
7ba64875ad master_id, depth, slaves default values
master_id, depth, slaves default values
2014-06-23 09:51:50 +02:00
7067e43b44 Core changes to support tee filter. 2014-06-20 17:49:40 +01:00
c759767a91 Use new session entry points to get remote and user rather than dereference
the DCB directly.
2014-06-19 16:07:21 +01:00
4d257897d3 Merge branch 'develop' of github.com:skysql/MaxScale into develop
Conflicts:
	server/core/session.c
	server/modules/protocol/mysql_backend.c
	server/modules/routing/readwritesplit/readwritesplit.c

Resolved.

Addition of user in topfilter report and general tidyup
2014-06-18 17:45:57 +01:00
1b6a5efb64 merge from develop
merge from develop
2014-06-18 11:51:47 +02:00
e0c3ef24d7 typo fix
typo fix
2014-06-17 13:05:31 +02:00
fe846885d5 depth and master_id fields added
depth and master_id fields added
2014-06-17 13:05:03 +02:00
49163a4c43 Merge branch 'develop' into MAX-11 2014-06-16 19:53:19 +03:00
189793f992 Clean up some compiler warnings 2014-06-16 08:40:04 +01:00
5bcae64538 When protocol closes DCB it calls dcb_close instead of dcb->func.close. dcb_close then calls dcb->func.close. This is now changed to all protocols and routers.
Rwsplit handles ERRACT_NEW_CONNECTION by clearing backend reference, removing callbacks and associating backend reference with new backend server. If it succeeds and the router session can continue, handleError returns true. Otherwise false. When ever false is returned it means that session must be closed.

Rwsplit now tolerates backend failures in a way that it searches new backends when monitor, backend, or client operation fails due to backend failure.
2014-06-15 23:44:07 +03:00
9eda859724 Added callback for rwsplit router which traverses through every rwsplit router session and for each rses, all backend references. Each bref is checked whether it is connected to non responsive server and if it is flagged to be waiting for response from the non-responsive backend. For matching ones, backend protocol's hangup function is called. 2014-06-13 08:01:26 +03:00
15ff1fd26a Fixed many error handling issues regading to timing and multiple threads.
Added flags to those backend references which have sent something to backend which causes the backend to send results or reply back. Didn't add removal of the flag since there's currently no way to tell whether response from backend contains anything else than session command reply - which aren't counted when BREF_WAITING_RESULT is set and cleared.
2014-06-12 23:22:51 +03:00
d17315b2cd Updated QLA filter to allow for regex matches and client address matches
to control the statements that are logged.
2014-06-11 23:55:29 +01:00
2963a8448b Implement non-blocking alternative to mutexes for read serialisation 2014-06-10 17:59:49 +01:00
a8def0d670 Additional error checking and documentation.
Implementation of topfilter options
2014-06-10 11:57:48 +01:00
77e1426dbf Initial upstream fitlering implementation.
Test filter with up and down stream filtering. Keeps top N queries
and prints a report of these queries on session close.
2014-06-09 21:13:28 +01:00
889bdd4f8c In dcb.c:dcb_close DCB is removed either before or after the call dcb->func.close. Since mysql backend protocol sends COM_QUIT and thus, writes to backend DCB, it is kept in DCB_STATE_POLLING until the write is completed.
dcb.h: define ERRHAND temporarily since changes are still behind that macro
Defined two error handling actions in router.h: ERRACT_NEW_COMMECTION and ERRACT_REPLY_CLIENT.
Failed database is logged at expanding frequence to error and to message log due changes in mysql_mon.c. Added two new members in MONITOR_SERVERS: mon_err_count, and mon_prev_status so that each backend can be treated individually.

Error handling: if mysql_backend.c:dcb_read fails, router's handleError is called instead of closing session.
	If mysql_client.c:SESSION_ROUTE_QUERY fails router's handleError is called instead of sending error to client.

	readwritesplit.c:select_connect_backend_servers is modified so that in can be called during active router session. When called, it attempts to find one master and maximum number of configured slaves in correct state if necessary.
	When handleError needs to replace failed unit it now calls select_connect_backend_servers.
2014-06-08 19:36:12 +03:00
9e164b83f0 Updates to debug CLI
Fix for argument passign to show filter

Addition of list dcbs commands
2014-06-07 20:41:58 +01:00
ad744962b2 Merge branch 'develop' into MAX-11
Conflicts:
	server/include/server.h
	server/modules/monitor/mysql_mon.c
	server/modules/protocol/mysql_client.c
	server/modules/routing/readwritesplit/readwritesplit.c
	utils/skygw_debug.h
2014-06-07 00:50:08 +03:00
7e6cb7afc2 Snapshot of failure tolerance changes.
Added a lot of logging to error, trace and message logs which should help the user to handle errors which can't be automatically resolved, like attempt to use nonexisting database.
2014-06-06 23:32:04 +03:00
ea177b481f Fixed for typo in modutil.h
Addition of timestamps to the query log produced by the QLA filter
2014-06-04 23:30:54 +01:00
46ca0676c0 A filter parameter fix and a new filter, the regex filter.
The regexfilter is an example of a query rewriting filter that uses
regular expressions to match the SQL text and allows a replacement text
to be used for each match of the regular expression.

Regexfilter has no special SQL undertanding, it merely uses the features
avialable inthe regex library to perform matches.

Statements that span multiple packets are not supported by the regex
filter.
2014-06-04 23:04:17 +01:00
f612b90cd7 Merge branch 'develop' into MAX-65 2014-06-04 21:14:31 +01:00
57e910ad3d Addition of the module utilities functions 2014-06-04 18:34:24 +01:00
1ebf27eab3 Add server maintenance mode.
Maintenance mode prevents a server from having new connections made
to it and stops MaxScale from monitoring a server. It is designed
to allow a server to be taken out of an active cluster for maintenance.
It prevents new connections and allowsg existing connections to
drain away prior to performaing maintenance on the server.
2014-06-03 09:25:09 +01:00
1d48794963 Addition of API modinfo implementation for filters 2014-06-02 18:18:31 +01:00
b764745fc3 Merge branch 'develop' into MAX-65
Conflicts:
	server/core/config.c
2014-06-02 18:07:09 +01:00
1245fba35b Addition of the module info structure to allow module information to
be extracted from the modules.

This gives a way to verify the API that the module provides as well
as the version of that API. The hope is that this will make it possible
for MaxScale to detect out of date plugins and either adapt to use them
or reject loading them.

Also added the ability to set a release state on a per module basis.
This allows for production ready and non-production ready plugins to
be identified.
2014-06-02 17:10:05 +01:00
857ae25570 Addition of session filter tracking in order to allow the show session
command to call the diagnostic entries points of the filters in the
session.

Slight improvements to the two example filters and a fix to the
trim routine.
2014-06-02 10:56:50 +01:00
8d55be4b23 First working filters implementaton.
Only downstream filters are supported currently, i.e. no result
set filtering can be done.

A crude QLA (Query Log All) filter is included as a test harness only
2014-05-30 16:45:39 +01:00