2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-27 03:49:57 +00:00

Ensure sync is complete prior to leaving configmanager sync

The initialization lock is meant to avoid collective and generic
initialization stepping on each other.  This is somewhat reduced in
efficacy if one has a sync running while the other is changing relevant
data.
This commit is contained in:
Jarrod Johnson 2018-10-10 14:49:33 -04:00
parent 3b2b96a4cf
commit 6a784e3a1c

View File

@ -626,7 +626,7 @@ def rollback_clear():
_cfgstore = _oldcfgstore
_oldtxcount = 0
_oldcfgstore = None
ConfigManager._bg_sync_to_file()
ConfigManager.wait_for_sync(True)
def clear_configuration():
@ -990,6 +990,7 @@ class ConfigManager(object):
if 'nodes' not in self._cfgstore:
self._cfgstore['nodes'] = {}
self._bg_sync_to_file()
self.wait_for_sync()
def get_collective_member(self, name):
return get_collective_member(name)