Construct diagnostics results in the monitor thread
MariaDBMonitor diagnostics printing is unsafe as some of the read fields are arrays. To be on the safe side, the fields are now read in the monitor worker thread. Since diagnostics must work even for stopped monitors, a worker task is used. In practice, it usually runs when the monitor is sleeping.
This commit is contained in:
@ -131,6 +131,15 @@ inline std::vector<std::string> strtok(std::string str, const char* delim)
|
||||
return rval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format parameters to a string. Uses printf-formatting.
|
||||
*
|
||||
* @param format Format string
|
||||
* @param ... Items to convert according to format string
|
||||
* @return The result string
|
||||
*/
|
||||
std::string string_printf(const char* format, ...) mxb_attribute((format (printf, 1, 2)));
|
||||
|
||||
/**
|
||||
* @class CloserTraits utils.hh <maxscale/utils.hh>
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user