Prevent data loss when target connection drops and buffer is flushed.
grzkv opened this issue · comments
Roman Grytskiv commented
Consider the following scenario when sending to host A
while using a buffer:
- Some records are sent to the target host
A
. A connection is opened, and records go through it. - No records arrive to be sent to the target host
A
for a couple of minutes. A
considers it a good strategy to close the connection, and it does.- A single record arrives to be sent to
A
. It is placed in the buffer. - We try to flush the buffer, and fail with something like "broken pipe".
- The record is lost.
The code is here:
Line 199 in ea36d20