python/qmp: increase read buffer size
authorMaksim Davydov <davydov-max@yandex-team.ru>
Thu, 12 Jan 2023 15:28:03 +0000 (18:28 +0300)
committerJohn Snow <jsnow@redhat.com>
Tue, 24 Jan 2023 18:37:13 +0000 (13:37 -0500)
Current 256KB is not enough for some real cases. As a possible solution
limit can be chosen to be the same as libvirt (10MB)

Signed-off-by: Maksim Davydov <davydov-max@yandex-team.ru>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 20230112152805.33109-3-davydov-max@yandex-team.ru
Signed-off-by: John Snow <jsnow@redhat.com>
python/qemu/qmp/qmp_client.py

index 5dcda04a75621596d4d65a3b3ba986d9d223a176..b5772e7f32b36790e8df99cf0f124716a9756f90 100644 (file)
@@ -197,8 +197,8 @@ class QMPClient(AsyncProtocol[Message], Events):
     #: Logger object used for debugging messages.
     logger = logging.getLogger(__name__)
 
-    # Read buffer limit; large enough to accept query-qmp-schema
-    _limit = (256 * 1024)
+    # Read buffer limit; 10MB like libvirt default
+    _limit = (10 * 1024 * 1024)
 
     # Type alias for pending execute() result items
     _PendingT = Union[Message, ExecInterruptedError]