MXS-2300: Add session command pruning
This commit adds a new parameter that, when enabled, prunes the session command history to a known length. This makes it possible to keep a client-side pooled connection open indefinitely at the cost of making reconnections theoretically unsafe. In practice the maximum history length can be set to a value that encompasses a single session using the pooled connection with no risk to session state integrity. The default history length of 50 commands is quite likely to be adequate for the majority of use-cases.
This commit is contained in:
@ -182,6 +182,7 @@ private:
|
||||
void process_sescmd_response(mxs::SRWBackend& backend, GWBUF** ppPacket);
|
||||
void compress_history(mxs::SSessionCommand& sescmd);
|
||||
|
||||
void prune_to_position(uint64_t pos);
|
||||
bool route_session_write(GWBUF* querybuf, uint8_t command, uint32_t type);
|
||||
void continue_large_session_write(GWBUF* querybuf, uint32_t type);
|
||||
bool route_single_stmt(GWBUF* querybuf);
|
||||
|
||||
Reference in New Issue
Block a user