Merge branch '2.1' into develop

This commit is contained in:
Markus Mäkelä
2017-02-08 09:32:18 +02:00
16 changed files with 120 additions and 179 deletions

View File

@ -1074,7 +1074,7 @@ void converter_func(void* data)
/** We reached end of file, flush unwritten records to disk */
if (router->task_delay == 1)
{
avro_flush_all_tables(router, true);
avro_flush_all_tables(router, AVROROUTER_FLUSH);
avro_save_conversion_state(router);
}

View File

@ -68,7 +68,12 @@ bool avro_open_binlog(const char *binlogdir, const char *file, int *dest)
if ((fd = open(path, O_RDONLY)) == -1)
{
MXS_ERROR("Failed to open binlog file %s.", path);
if (errno != ENOENT)
{
char err[MXS_STRERROR_BUFLEN];
MXS_ERROR("Failed to open binlog file %s: %d, %s", path, errno,
strerror_r(errno, err, sizeof(err)));
}
return false;
}
@ -745,7 +750,7 @@ avro_binlog_end_t avro_read_all_events(AVRO_INSTANCE *router)
router->trx_count >= router->trx_target)
{
update_used_tables(router);
avro_flush_all_tables(router, false);
avro_flush_all_tables(router, AVROROUTER_SYNC);
avro_save_conversion_state(router);
notify_all_clients(router);
total_rows += router->row_count;

View File

@ -272,7 +272,6 @@ bool handle_row_event(AVRO_INSTANCE *router, REP_HEADER *hdr, uint8_t *ptr)
/** There should always be a table map event prior to a row event.
* TODO: Make the active_maps dynamic */
TABLE_MAP *map = router->active_maps[table_id % sizeof(router->active_maps)];
ss_dassert(map);
if (map)
{

View File

@ -479,7 +479,15 @@ static const char *extract_field_name(const char* ptr, char* dest, size_t size)
if (ptr > start)
{
/** Valid identifier */
snprintf(dest, size, "%.*s", (int)(ptr - start), start);
size_t bytes = ptr - start;
if (bt)
{
bytes--;
}
memcpy(dest, start, bytes);
dest[bytes] = '\0';
make_valid_avro_identifier(dest);
ptr = next_field_definition(ptr);

View File

@ -134,12 +134,6 @@ struct subcommand showoptions[] =
{0, 0, 0}
},
#endif
{
"dcblist", 0, 0, dprintDCBList,
"Show DCB statistics",
"Show statistics for the list of all DCBs(descriptor control blocks)",
{0}
},
{
"dcbs", 0, 0, dprintAllDCBs,
"Show all DCBs",
@ -166,12 +160,6 @@ struct subcommand showoptions[] =
"Show the epoll polling system statistics",
{0, 0, 0}
},
{
"eventq", 0, 0, dShowEventQ,
"Show event queue",
"Show the queue of events waiting to be processed",
{0, 0, 0}
},
{
"eventstats", 0, 0, dShowEventStats,
"Show event queue statistics",
@ -262,12 +250,6 @@ struct subcommand showoptions[] =
"Show a single session in MaxScale, e.g. show session 5",
{ARG_TYPE_SESSION, 0, 0}
},
{
"sessionlist", 0, 0, dprintSessionList,
"Show session list statistics",
"Show statistics for the list of all sessions",
{0, 0, 0}
},
{
"sessions", 0, 0, dprintAllSessions,
"Show all sessions",