Process partial read as exceptional condition.
In the protocol implementation we use the function read-whole-chunk for pre-loading data from the network, in a case when we know from the previous bytes the expected length of the chunk. In case of a partial read, we are hitting the (Got timeout writing communication packets) MySQL condition. Trying to finish the partial read gets us nowhere, the communication is broken. What usually happens instead of resuming the read is an infinite loop over a CLOSE_WAIT socket. The wiser choice seems to signal an error with details about the situation to the user, which is what we do here. See https://github.com/dimitri/pgloader/issues/420 and https://github.com/dimitri/pgloader/issues/337.
parent
cd6179cc
Please register or sign in to comment