Log duration of local tenant layout update

Similar to the reconfiguration, log the time it takes for a scheduler to
update the local layout of a tenant.

Change-Id: I6e59684374bbdac282b8c7bf424498e242a9d295
This commit is contained in:
Simon Westphahl 2022-01-18 12:09:50 +01:00 committed by James E. Blair
parent 7f06beb1b6
commit 1ed1861089
1 changed files with 5 additions and 0 deletions

View File

@ -1075,6 +1075,7 @@ class Scheduler(threading.Thread):
self.connections, self.zk_client, self.globals, self.statsd, self,
self.merger, self.keystore)
with self.layout_lock:
start = time.monotonic()
log.debug("Updating local layout of tenant %s ", tenant_name)
layout_state = self.tenant_layout_state.get(tenant_name)
layout_uuid = layout_state and layout_state.uuid
@ -1097,6 +1098,10 @@ class Scheduler(threading.Thread):
with suppress(KeyError):
del self.local_layout_state[tenant_name]
duration = round(time.monotonic() - start, 3)
self.log.info("Local layout update complete for %s (duration: %s "
"seconds)", tenant_name, duration)
def _checkTenantSourceConf(self, config):
tenant_config = None
script = False