mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-15 22:42:23 +01:00
Make linearizer more quiet (#4507)
This commit is contained in:
parent
073f6c2e5e
commit
f815bd7feb
2 changed files with 6 additions and 5 deletions
1
changelog.d/4507.misc
Normal file
1
changelog.d/4507.misc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Reduce the log level of linearizer lock acquirement to DEBUG.
|
|
@ -201,7 +201,7 @@ class Linearizer(object):
|
||||||
if entry[0] >= self.max_count:
|
if entry[0] >= self.max_count:
|
||||||
res = self._await_lock(key)
|
res = self._await_lock(key)
|
||||||
else:
|
else:
|
||||||
logger.info(
|
logger.debug(
|
||||||
"Acquired uncontended linearizer lock %r for key %r", self.name, key,
|
"Acquired uncontended linearizer lock %r for key %r", self.name, key,
|
||||||
)
|
)
|
||||||
entry[0] += 1
|
entry[0] += 1
|
||||||
|
@ -215,7 +215,7 @@ class Linearizer(object):
|
||||||
try:
|
try:
|
||||||
yield
|
yield
|
||||||
finally:
|
finally:
|
||||||
logger.info("Releasing linearizer lock %r for key %r", self.name, key)
|
logger.debug("Releasing linearizer lock %r for key %r", self.name, key)
|
||||||
|
|
||||||
# We've finished executing so check if there are any things
|
# We've finished executing so check if there are any things
|
||||||
# blocked waiting to execute and start one of them
|
# blocked waiting to execute and start one of them
|
||||||
|
@ -247,7 +247,7 @@ class Linearizer(object):
|
||||||
"""
|
"""
|
||||||
entry = self.key_to_defer[key]
|
entry = self.key_to_defer[key]
|
||||||
|
|
||||||
logger.info(
|
logger.debug(
|
||||||
"Waiting to acquire linearizer lock %r for key %r", self.name, key,
|
"Waiting to acquire linearizer lock %r for key %r", self.name, key,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@ class Linearizer(object):
|
||||||
entry[1][new_defer] = 1
|
entry[1][new_defer] = 1
|
||||||
|
|
||||||
def cb(_r):
|
def cb(_r):
|
||||||
logger.info("Acquired linearizer lock %r for key %r", self.name, key)
|
logger.debug("Acquired linearizer lock %r for key %r", self.name, key)
|
||||||
entry[0] += 1
|
entry[0] += 1
|
||||||
|
|
||||||
# if the code holding the lock completes synchronously, then it
|
# if the code holding the lock completes synchronously, then it
|
||||||
|
@ -273,7 +273,7 @@ class Linearizer(object):
|
||||||
def eb(e):
|
def eb(e):
|
||||||
logger.info("defer %r got err %r", new_defer, e)
|
logger.info("defer %r got err %r", new_defer, e)
|
||||||
if isinstance(e, CancelledError):
|
if isinstance(e, CancelledError):
|
||||||
logger.info(
|
logger.debug(
|
||||||
"Cancelling wait for linearizer lock %r for key %r",
|
"Cancelling wait for linearizer lock %r for key %r",
|
||||||
self.name, key,
|
self.name, key,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue