MXS-1929: Make services destroyable

Services can now be destroyed if they have no active listeners and they
are not linked to servers. When these conditions are met, the service will
be destroyed when the last session for the service is closed.

The closing of a service will close all listeners that were once assigned
to the service. This allows closing of the ports at runtime which
previously was done only on shutdown.

Exposed the command through the REST API but not through MaxAdmin as it is
deprecated.
This commit is contained in:
Markus Mäkelä
2018-07-18 10:03:54 +03:00
parent 18c1ec2678
commit 5a40064826
7 changed files with 163 additions and 4 deletions

View File

@ -157,6 +157,7 @@ typedef struct service
uint64_t capabilities; /**< The capabilities of the service, @see enum routing_capability */
int max_retry_interval; /**< Maximum retry interval */
bool session_track_trx_state; /**< Get transaction state via session track mechanism */
bool active; /**< Whether the service is still active */
} SERVICE;
typedef enum count_spec_t