Only update index file if file is flushed to disk

There's no point in indexing the file if it hasn't been synced to
disk. Any attempts to index the file will fail if the file still has an
open data block.
This commit is contained in:
Markus Mäkelä 2017-02-11 12:48:07 +02:00
parent cf63e4cb9e
commit eb1e163bdf

View File

@ -886,7 +886,10 @@ void avro_flush_all_tables(AVRO_INSTANCE *router, enum avrorouter_file_op flush)
}
/** Update the GTID index */
avro_update_index(router);
if (flush == AVROROUTER_FLUSH)
{
avro_update_index(router);
}
}
/**