mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-07-30 14:43:05 +03:00
Add new batch writer SinglePacketBackpressureBatchWriter to retry failed writes
Summary: The existing batch writers do not handle failed writes to the AsyncUDPSocket. A packet that fails to be written is detected as a packet loss later when feedback is received from the peer. This negatively impacts the congestion controller because of the fake loss signal, and artificially inflates the number of retransmitted packets/bytes. This change adds a new batch writer (SinglePacketBackpressuretBatchWriter) that retains the buffers when a write fails. For subsequent writes, the writer retries the same buffer. No new packets are scheduled until the retried buffer succeeds. Notes: - To make sure that retry writes are scheduled, the write callback is installed on the socket when a buffer needs to be retried. - The retries are for an already scheduled packet. The connection state reflects the timing of the first attempt. This could still have an impact on rtt samples, etc. but it this is a milder impact compared to fake losses/retranmissions. - Any changes outside of the batch writer only impact the new batch writer. Existing batch writers do not use the fields and are not affected by the changes in this diff. Reviewed By: kvtsoy Differential Revision: D57597576 fbshipit-source-id: 9476d71ce52e383c5946466f64bb5eecd4f5d549
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9674b08e71
commit
71b8af4b1a
@ -32,11 +32,17 @@ BatchWriterPtr makeSendmmsgGsoBatchWriter(uint32_t batchSize) {
|
||||
BatchWriterPtr BatchWriterFactory::makeBatchWriter(
|
||||
const quic::QuicBatchingMode& batchingMode,
|
||||
uint32_t batchSize,
|
||||
bool enableBackpressure,
|
||||
DataPathType dataPathType,
|
||||
QuicConnectionStateBase& conn,
|
||||
bool gsoSupported) {
|
||||
return makeBatchWriterHelper(
|
||||
batchingMode, batchSize, dataPathType, conn, gsoSupported);
|
||||
batchingMode,
|
||||
batchSize,
|
||||
enableBackpressure,
|
||||
dataPathType,
|
||||
conn,
|
||||
gsoSupported);
|
||||
}
|
||||
|
||||
} // namespace quic
|
||||
|
Reference in New Issue
Block a user