MXS-1536: Always recreate TABLE_MAP objects
When a table map event is read after an alter table, the old TABLE_MAP object contains old information. Due to this, as well as the added benefit of making the code easier to read, the recycling of TABLE_MAP objects was removed. In practice, there were no benefits to re-mapping the tables to a different ID.
This commit is contained in:
@ -971,6 +971,8 @@ bool save_and_replace_table_create(AVRO_INSTANCE *router, TABLE_CREATE *created)
|
||||
{
|
||||
if (strcmp(key, table_ident) == 0)
|
||||
{
|
||||
TABLE_MAP* map = hashtable_fetch(router->table_maps, key);
|
||||
router->active_maps[map->id % MAX_MAPPED_TABLES] = NULL;
|
||||
hashtable_delete(router->table_maps, key);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user