2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-26 11:30:23 +00:00

Clear txcount on enroll

The transaction count on 'join' was being honored as high, when
it never should be.
This commit is contained in:
Jarrod Johnson 2018-07-11 09:40:22 -04:00
parent 704aaeecf9
commit 8e9bcbb44f
2 changed files with 3 additions and 0 deletions

View File

@ -227,6 +227,7 @@ def handle_connection(connection, cert, request, local=False):
f = open('/etc/confluent/cfg/myname', 'w')
f.write(name)
f.close()
cfm.clear_configuration()
eventlet.spawn_n(connect_to_leader, rsp['collective']['fingerprint'], name)
if 'enroll' == operation:
#TODO(jjohnson2): error appropriately when asked to enroll, but the master is elsewhere

View File

@ -497,8 +497,10 @@ def stop_leading():
def clear_configuration():
global _cfgstore
global _txcount
_cfgstore = {}
todelete = _config_areas + ('globals', 'collective', 'transactioncount')
_txcount = 0
for cfg in todelete:
try:
os.remove(os.path.join(ConfigManager._cfgdir, cfg))