When non-leaf datanode in a pipeline is slow on or stuck at disk I/O, the downstream node can timeout on reading packet since even the heartbeat packets will not be relayed down.
The packet read timeout is set in DataXceiver#run():
When the downstream node times out and closes the connection to the upstream, the upstream node's PacketResponder gets EOFException and it sends an ack upstream with the downstream node status set to ERROR. This caused the client to exclude the downstream node, even thought the upstream node was the one got stuck.
The connection to downstream has longer timeout, so the downstream will always timeout first. The downstream timeout is set in writeBlock()