-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
In the file cluster.py there is a line that logs the args as debug using a fstring. This is a significant bottleneck when sending large messages even when logging is disabled since the fstring is always evaluated. Please could it be changed as follows:
diff cluster.py cluster.py -u
--- cluster.py 2022-04-12 09:47:46.545790433 +0000
+++ cluster.py 2022-04-12 09:51:55.789286947 +0000
@@ -900,7 +900,7 @@
node = self.nodes_manager.get_node_from_slot(
slot, self.read_from_replicas and command in READ_COMMANDS
)
-
log.debug(f"Target for {args}: slot {slot}")
-
log.debug("Target for {%s}: slot {%s}",args,slot) return [node]
def _should_reinitialized(self):