Remove unused DCB callback code

The highwater and lowwater callbacks were never registered for the client
DCBs in the binlogrouter.

The DCB hangup callbacks were never called by the core and were replaced
with fake hangup events in an earlier version.
This commit is contained in:
Markus Mäkelä
2017-02-21 10:25:01 +02:00
parent c3cc46ae04
commit 68f99ae305
7 changed files with 0 additions and 161 deletions

View File

@ -192,8 +192,6 @@ MXS_MODULE* MXS_CREATE_MODULE()
{"encrypt_binlog", MXS_MODULE_PARAM_BOOL, "false"},
{"encryption_algorithm", MXS_MODULE_PARAM_ENUM, "aes_cbc", MXS_MODULE_OPT_NONE, enc_algo_values},
{"encryption_key_file", MXS_MODULE_PARAM_PATH, NULL, MXS_MODULE_OPT_PATH_R_OK},
{"lowwater", MXS_MODULE_PARAM_COUNT, DEF_LOW_WATER},
{"highwater", MXS_MODULE_PARAM_COUNT, DEF_HIGH_WATER},
{"shortburst", MXS_MODULE_PARAM_COUNT, DEF_SHORT_BURST},
{"longburst", MXS_MODULE_PARAM_COUNT, DEF_LONG_BURST},
{"burstsize", MXS_MODULE_PARAM_SIZE, DEF_BURST_SIZE},
@ -321,8 +319,6 @@ createInstance(SERVICE *service, char **options)
MXS_CONFIG_PARAMETER *params = service->svc_config_param;
inst->low_water = config_get_integer(params, "lowwater");
inst->high_water = config_get_integer(params, "highwater");
inst->initbinlog = config_get_integer(params, "file");
inst->short_burst = config_get_integer(params, "shortburst");
@ -394,8 +390,6 @@ createInstance(SERVICE *service, char **options)
* password=
* master-id=
* filestem=
* lowwater=
* highwater=
*/
if (options)
{
@ -535,14 +529,6 @@ createInstance(SERVICE *service, char **options)
MXS_FREE(inst->encryption.key_management_filename);
inst->encryption.key_management_filename = MXS_STRDUP_A(value);
}
else if (strcmp(options[i], "lowwater") == 0)
{
inst->low_water = atoi(value);
}
else if (strcmp(options[i], "highwater") == 0)
{
inst->high_water = atoi(value);
}
else if (strcmp(options[i], "shortburst") == 0)
{
inst->short_burst = atoi(value);

View File

@ -574,8 +574,6 @@ typedef struct router_instance
int rotating; /*< Rotation in progress flag */
BLFILE *files; /*< Files used by the slaves */
SPINLOCK fileslock; /*< Lock for the files queue above */
unsigned int low_water; /*< Low water mark for client DCB */
unsigned int high_water; /*< High water mark for client DCB */
unsigned int short_burst; /*< Short burst for slave catchup */
unsigned int long_burst; /*< Long burst for slave catchup */
unsigned long burst_size; /*< Maximum size of burst to send */

View File

@ -2289,9 +2289,6 @@ blr_slave_binlog_dump(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, GWBUF *queue
blr_slave_read_ste(router, slave, fde_end_pos);
}
slave->dcb->low_water = router->low_water;
slave->dcb->high_water = router->high_water;
dcb_add_callback(slave->dcb, DCB_REASON_DRAINED, blr_slave_callback, slave);
slave->state = BLRS_DUMPING;