From eb1e163bdf627dade3fb67d754f69d7918c8e741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Sat, 11 Feb 2017 12:48:07 +0200 Subject: [PATCH] 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. --- server/modules/routing/avrorouter/avro_file.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/modules/routing/avrorouter/avro_file.c b/server/modules/routing/avrorouter/avro_file.c index db542697d..7341d671a 100644 --- a/server/modules/routing/avrorouter/avro_file.c +++ b/server/modules/routing/avrorouter/avro_file.c @@ -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); + } } /**