MXS-2012 Write replication lag to SERVER

Allows routers to read the value.
This commit is contained in:
Esa Korhonen
2018-08-20 15:25:01 +03:00
parent 44a57dbefd
commit 03cefcc4ac
7 changed files with 39 additions and 19 deletions

View File

@ -49,6 +49,10 @@ const int MAINTENANCE_NO_CHANGE = 0;
const int MAINTENANCE_ON = 100;
const int MAINTENANCE_FLAG_NOCHECK = 0;
const int MAINTENANCE_FLAG_CHECK = -1;
// Default replication lag value
const int MXS_RLAG_UNDEFINED = -1;
/**
* The server parameters used for weighting routing decissions
*/
@ -158,12 +162,6 @@ typedef struct server
MxsDiskSpaceThreshold* disk_space_threshold; /**< Disk space thresholds */
} SERVER;
enum
{
MAX_RLAG_NOT_AVAILABLE = -1,
MAX_RLAG_UNDEFINED = -2
};
/**
* Status bits in the SERVER->status member, which describes the general state of a server. Although the
* individual bits are independent, not all combinations make sense or are used. The bitfield is 64bits wide.