From 0016077beeee47aae0d83aea19dc5d648d25f5d6 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 13 Jul 2018 22:15:38 -0400 Subject: [PATCH] Ensure that wait_for_sync always does a new sync If a sync is in progress, wait for that to complete. Then issue the requested *new* sync. Probably only needed if fullsync, as the one in progress may be a 'dirty' only sync and fullsync would be satisfied by the partial sync without it, which is bad. --- confluent_server/confluent/config/configmanager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/confluent_server/confluent/config/configmanager.py b/confluent_server/confluent/config/configmanager.py index c94db976..4f63cf62 100644 --- a/confluent_server/confluent/config/configmanager.py +++ b/confluent_server/confluent/config/configmanager.py @@ -1906,6 +1906,8 @@ class ConfigManager(object): @classmethod def wait_for_sync(cls, fullsync=False): + if cls._cfgwriter is not None: + cls._cfgwriter.join() cls._bg_sync_to_file(fullsync) if cls._cfgwriter is not None: cls._cfgwriter.join()