Moved the housekeeper heartbeat to a separate header for ease of integration.
This keeps the behavior the same but allows the heartbeat to be used as a crude timer without including everything the housekeeper.h header includes. Moved the protocol level updates on the DCBs last_read value into dcb_read. This keeps the implementation nice and compact.
This commit is contained in:
@ -70,6 +70,7 @@
|
||||
#include <skygw_utils.h>
|
||||
#include <log_manager.h>
|
||||
#include <hashtable.h>
|
||||
#include <hk_heartbeat.h>
|
||||
|
||||
/** Defined in log_manager.cc */
|
||||
extern int lm_enabled_logfiles_bitmask;
|
||||
@ -816,6 +817,9 @@ int dcb_read(
|
||||
n = 0;
|
||||
goto return_n;
|
||||
}
|
||||
|
||||
dcb->last_read = hkheartbeat;
|
||||
|
||||
bufsize = MIN(b, MAX_BUFFER_SIZE);
|
||||
|
||||
if ((buffer = gwbuf_alloc(bufsize)) == NULL)
|
||||
|
Reference in New Issue
Block a user