You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Writing new data to a saturated TCP connection can cause outgoing data to be duplicated. IMHO the problem is iocpreactor.abstract.FileHandle.doWrite can get called again before ._handleWrite got the chance to update the bytes already written.
The new test_tcp.LargeBufferTests writes the last byte in a separate .write(). Sadly, behaviour is not fully deterministic. Most runs fail on iocp reactor with too many bytes received, some fail with not enough bytes received (have not understood this to date), and very few run ok.Everything works fine on the select reactor.
@hawkowl, sorry to assign to you directly but since you are working on py3.7 support for the iocp reactor you are hopefully the right person. I am not 100% the proposed solution in the PR is how it should be done but the new test_tcp.LargeBufferTests demonstrates the issue with the current iocp reactor.
#!CommitTicketReference repository="" revision="92c1353bf61c36f821fab959fe64eea252be8a5b"
Merge pull request #1025 from asodeur/issue9446
Author: asodeur
Reviewer: adiroiban, glyph
Fixes: ticket:9446
The IOCP reactor no longer duplicates/loses outgoing data when .write() is called in rapid succession with large payloads.
Writing new data to a saturated TCP connection can cause outgoing data to be duplicated. IMHO the problem is
iocpreactor.abstract.FileHandle.doWrite
can get called again before._handleWrite
got the chance to update the bytes already written.The new
test_tcp.LargeBufferTests
writes the last byte in a separate.write()
. Sadly, behaviour is not fully deterministic. Most runs fail on iocp reactor with too many bytes received, some fail with not enough bytes received (have not understood this to date), and very few run ok.Everything works fine on the select reactor.This PR 1025 should be a fix.
Attachments:
Searchable metadata
The text was updated successfully, but these errors were encountered: