During health checks of the query scheduler, when a TCP connection is opened without sending data (e.g., < /dev/tcp/query_scheduler/7000), the scheduler logs verbose error messages about incomplete reads.
future: <Task finished name='Task-16' coro=<handle_reducer_connection() done, defined at /opt/clp/lib/python3/site-packages/job_orchestration/scheduler/query/reducer_handler.py:104> exception=IncompleteReadError('0 bytes read on a total of 8 expected bytes')>
Traceback (most recent call last):
File "/opt/clp/lib/python3/site-packages/job_orchestration/scheduler/query/reducer_handler.py", line 110, in handle_reducer_connection
message_bytes = await _recv_msg_from_reducer(reader)
File "/opt/clp/lib/python3/site-packages/job_orchestration/scheduler/query/reducer_handler.py", line 87, in _recv_msg_from_reducer
msg_size_bytes = await reader.readexactly(8)
File "/usr/lib/python3.10/asyncio/streams.py", line 706, in readexactly
raise exceptions.IncompleteReadError(incomplete, n)
asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of 8 expected bytes
The query scheduler should handle empty connections gracefully without logging errors or stack traces.
Context
During health checks of the query scheduler, when a TCP connection is opened without sending data (e.g.,
< /dev/tcp/query_scheduler/7000), the scheduler logs verbose error messages about incomplete reads.Current Behaviour
Every empty request produces this error in the logs:
Desired Behaviour
The query scheduler should handle empty connections gracefully without logging errors or stack traces.
References