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:
parent
3b2b96a4cf
commit
6a784e3a1c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user