Fix some leftovers from the SESSION->MXS_SESSION and related renames
Renames only.
This commit is contained in:
parent
46e9e6f4e7
commit
00f77bbe69
@ -38,7 +38,7 @@ When client protocol module receives query from client the protocol state is (ty
|
||||
|
||||
### Backend failure
|
||||
|
||||
When mysql_client.c:gw_read_client_event calls either route_by_statement or directly SESSION_ROUTE_QUERY script, which calls the routeQuery function of the head session’s router. routeQuery returns 1 if succeed, or 0 in case of error. Success here means that query was routed and reply will be sent to the client while error means that routing failed because of backend (server/servers/service) failure or because of side effect of backend failure.
|
||||
When mysql_client.c:gw_read_client_event calls either route_by_statement or directly MXS_SESSION_ROUTE_QUERY script, which calls the routeQuery function of the head session’s router. routeQuery returns 1 if succeed, or 0 in case of error. Success here means that query was routed and reply will be sent to the client while error means that routing failed because of backend (server/servers/service) failure or because of side effect of backend failure.
|
||||
|
||||
In case of backend failure, error is replied to client and handleError is called to resolve backend problem. handleError is called with action ERRACT_NEW_CONNECTION which tells to error handler that it should try to find a replacement for failed backend. Handler will return true if there are enough backend servers for session’s needs. If handler returns false it means that session can’t continue processing further queries and will be closed. Client will be sent an error message and dcb_close is called for client DCB.
|
||||
|
||||
@ -52,5 +52,5 @@ Reasons for "backend failure" in rwsplit:
|
||||
|
||||
### Router error
|
||||
|
||||
In cases where SESSION_ROUTE_QUERY has returned successfully (=1) query may not be successfully processed in backend or even sent to it. It is possible that router fails in routing the particular query but there is no such error which would prevent session from continuing. In this case router handles error silently by creating and adding MySQL error to first available backend’s (incoming) eventqueue where it is found and sent to client (clientReply).
|
||||
In cases where MXS_SESSION_ROUTE_QUERY has returned successfully (=1) query may not be successfully processed in backend or even sent to it. It is possible that router fails in routing the particular query but there is no such error which would prevent session from continuing. In this case router handles error silently by creating and adding MySQL error to first available backend’s (incoming) eventqueue where it is found and sent to client (clientReply).
|
||||
|
||||
|
@ -153,9 +153,9 @@ protected:
|
||||
FilterSession(MXS_SESSION* pSession);
|
||||
|
||||
protected:
|
||||
MXS_SESSION* m_pSession; /*< The SESSION this filter session is associated with. */
|
||||
Downstream m_down; /*< The downstream component. */
|
||||
Upstream m_up; /*< The upstream component. */
|
||||
MXS_SESSION* m_pSession; /*< The MXS_SESSION this filter session is associated with. */
|
||||
Downstream m_down; /*< The downstream component. */
|
||||
Upstream m_up; /*< The upstream component. */
|
||||
};
|
||||
|
||||
|
||||
@ -180,7 +180,7 @@ protected:
|
||||
* public:
|
||||
* static MyFilter* create(const char* zName, char** pzOptions, FILTER_PARAMETER** ppParams);
|
||||
*
|
||||
* MyFilterSession* newSession(SESSION* pSession);
|
||||
* MyFilterSession* newSession(MXS_SESSION* pSession);
|
||||
*
|
||||
* void diagnostics(DCB* pDcb);
|
||||
* static uint64_t getCapabilities();
|
||||
|
@ -204,7 +204,7 @@ typedef struct session
|
||||
* the replies to the first element in the pipeline of filters and
|
||||
* the protocol.
|
||||
*/
|
||||
#define SESSION_ROUTE_REPLY(sess, buf) \
|
||||
#define MXS_SESSION_ROUTE_REPLY(sess, buf) \
|
||||
((sess)->tail.clientReply)((sess)->tail.instance, \
|
||||
(sess)->tail.session, (buf))
|
||||
|
||||
@ -243,7 +243,7 @@ RESULTSET *sessionGetList(SESSIONLISTFILTER);
|
||||
* @note The return value is valid only if either a router or a filter
|
||||
* has declared that it needs RCAP_TYPE_TRANSACTION_TRACKING.
|
||||
*
|
||||
* @param ses The SESSION object.
|
||||
* @param ses The MXS_SESSION object.
|
||||
* @return The transaction state.
|
||||
*/
|
||||
mxs_session_trx_state_t session_get_trx_state(const MXS_SESSION* ses);
|
||||
@ -253,7 +253,7 @@ mxs_session_trx_state_t session_get_trx_state(const MXS_SESSION* ses);
|
||||
*
|
||||
* NOTE: Only the protocol object may call this.
|
||||
*
|
||||
* @param ses The SESSION object.
|
||||
* @param ses The MXS_SESSION object.
|
||||
* @param new_state The new transaction state.
|
||||
*
|
||||
* @return The previous transaction state.
|
||||
@ -350,7 +350,7 @@ static inline bool session_set_autocommit(MXS_SESSION* ses, bool autocommit)
|
||||
* This creates an additional reference to a session whose unique ID matches @c id.
|
||||
*
|
||||
* @param id Unique session ID
|
||||
* @return Reference to a SESSION or NULL if the session was not found
|
||||
* @return Reference to a MXS_SESSION or NULL if the session was not found
|
||||
*
|
||||
* @note The caller must free the session reference by calling session_put_ref
|
||||
*/
|
||||
@ -363,7 +363,7 @@ MXS_SESSION* session_get_by_id(int id);
|
||||
* as long as it is needed.
|
||||
*
|
||||
* @param session Session reference to get
|
||||
* @return Reference to a SESSION
|
||||
* @return Reference to a MXS_SESSION
|
||||
*
|
||||
* @note The caller must free the session reference by calling session_put_ref
|
||||
*/
|
||||
|
@ -594,7 +594,7 @@ dcb_process_victim_queue(int threadid)
|
||||
|
||||
/** After these calls, the DCB should be treated as if it were freed.
|
||||
* Whether it is actually freed depends on the type of the DCB and how
|
||||
* many DCBs are linked to it via the SESSION object. */
|
||||
* many DCBs are linked to it via the MXS_SESSION object. */
|
||||
dcb->state = DCB_STATE_DISCONNECTED;
|
||||
dcb_remove_from_list(dcb);
|
||||
dcb_final_free(dcb);
|
||||
|
@ -184,7 +184,7 @@ cdc_read_event(DCB* dcb)
|
||||
|
||||
// gwbuf_set_type(head, GWBUF_TYPE_CDC);
|
||||
// the router will close the client connection
|
||||
//rc = SESSION_ROUTE_QUERY(session, head);
|
||||
//rc = MXS_SESSION_ROUTE_QUERY(session, head);
|
||||
|
||||
// buffer not handled by router right now, consume it
|
||||
gwbuf_free(head);
|
||||
|
@ -674,7 +674,7 @@ static void
|
||||
clientReply(ROUTER *instance, void *router_session, GWBUF *queue, DCB *backend_dcb)
|
||||
{
|
||||
ss_dassert(backend_dcb->session->client_dcb != NULL);
|
||||
SESSION_ROUTE_REPLY(backend_dcb->session, queue);
|
||||
MXS_SESSION_ROUTE_REPLY(backend_dcb->session, queue);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -765,7 +765,7 @@ static void clientReply(ROUTER *instance, void *router_session, GWBUF *writebuf,
|
||||
if (writebuf != NULL && client_dcb != NULL)
|
||||
{
|
||||
/** Write reply to client DCB */
|
||||
SESSION_ROUTE_REPLY(backend_dcb->session, writebuf);
|
||||
MXS_SESSION_ROUTE_REPLY(backend_dcb->session, writebuf);
|
||||
}
|
||||
/** Unlock router session */
|
||||
rses_end_locked_router_action(router_cli_ses);
|
||||
|
@ -2470,7 +2470,7 @@ static void clientReply(ROUTER* instance,
|
||||
PTR_IS_ERR(cmd) ? "ERR" : PTR_IS_OK(cmd) ? "OK" : "RSET",
|
||||
state & INIT_UNINT ? "UNINIT" : state & INIT_MAPPING ? "MAPPING" : "READY",
|
||||
router_cli_ses->rses_client_dcb->session);
|
||||
SESSION_ROUTE_REPLY(backend_dcb->session, writebuf);
|
||||
MXS_SESSION_ROUTE_REPLY(backend_dcb->session, writebuf);
|
||||
}
|
||||
/** Unlock router session */
|
||||
rses_end_locked_router_action(router_cli_ses);
|
||||
|
Loading…
x
Reference in New Issue
Block a user