-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-4493 - Use asyncio protocols instead of sockets for network IO #2151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+1,127
−801
Merged
Changes from 58 commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
4bff4fd
Standalone commands only
NoahStapp 488c93f
remove socket code
NoahStapp 4601fbf
Add TLS support
NoahStapp fc010ee
Support reading more than 64KB
NoahStapp 39dcb1e
debugging
NoahStapp 3e9d992
Spike
NoahStapp 4853245
Test BufferedProtocol
NoahStapp 09dbece
Remove TOTALs
NoahStapp 79705b9
Restore TOTALS
NoahStapp 39e9ea5
Restore TOTALS
NoahStapp 0f165b7
Comment out unused networking
NoahStapp 83e7e6b
Only one drain waiter
NoahStapp f638c04
Reuse protocol buffer
NoahStapp 51b6537
Use sliding buffer for protocols
NoahStapp c2e62ce
Wrapping buffer WIP
NoahStapp 63cfbbc
Don't unpack messages inside protocol
NoahStapp 55dfaca
Working protocols with debugging prints
NoahStapp 2d0f4c1
Final POC for Wire Protocol-handling protocol
NoahStapp 4b25e95
Fix synchro
NoahStapp 574c0ec
WIP abstraction of Connection.conn to Connection.NetworkingInterface
NoahStapp 482485d
Sync tests all passing
NoahStapp cf27d65
WIP exhaust cursors should return all data in first read
NoahStapp fbd33cd
WIP exhaust + changestream support in protocols
NoahStapp 8e56a93
Merge branch 'master' into PYTHON-4493-prod
NoahStapp e7aedbf
Test cleanup
NoahStapp bbe4ef8
More cleanup
NoahStapp cfeb7c4
No SSL no auth single tests passing
NoahStapp 1eccc12
Merge branch 'master' into PYTHON-4493-prod
NoahStapp d73aab1
Correctly pause and resume reading
NoahStapp f13fe67
Fix typing and KMS requests
NoahStapp 0abdcc0
More typing fixes
NoahStapp ca1d208
Fix overflow calculation
NoahStapp 850ff33
Fix encryption
NoahStapp 9aa51c5
Fix connection helpers
NoahStapp e528773
Fixes
NoahStapp 427bc36
Re-combine into pool_shared
NoahStapp 2d341b8
More typing fixes
NoahStapp f1d1486
Merge branch 'master' into PYTHON-4493-prod
NoahStapp f1dd064
Use synchronous getaddrinfo
NoahStapp 77389e4
Typing
NoahStapp e00e44f
Fix buffer_updated race condition with read
NoahStapp 01af881
Fix process_header offsets
NoahStapp 02cf3c1
Store opcode in future for read
NoahStapp 36fb9cf
Fix multiple message processing in buffer_updated
NoahStapp b5ac22d
Fix recursive buffer_updated condition
NoahStapp 9fd9176
Cleanup + comments
NoahStapp 2af8299
Fix request_id resetting
NoahStapp 3e45d72
Fix synchronous socket pending
NoahStapp b94afb4
Update get_buffer docstring
NoahStapp 2aff6b1
Reset Protocol after each message
NoahStapp ee1f308
Test edge case where get_buffer is called with a sizehint of 0 on SSL
NoahStapp 344f1f9
Merge branch 'master' into PYTHON-4493-prod
NoahStapp d8f4734
Add SSL EOF check in get_buffer
NoahStapp f3ebf92
Merge branch 'master' into PYTHON-4493-prod
NoahStapp be4bec6
PyMongoProtocol.read() returns a copy of the buffer
NoahStapp 04fa6db
Merge branch 'master' into PYTHON-4493-prod
NoahStapp 09d5e49
Merge branch 'master' into PYTHON-4493-prod
NoahStapp 0c11812
Merge branch 'master' into PYTHON-4493-prod
NoahStapp 9b00835
PYTHON-4493 set_write_buffer_limits plus ignore paused writing
ShaneHarvey 90e6720
PYTHON-4493 Fix read perf
ShaneHarvey 95569ac
PYTHON-4493 Fix type errors
ShaneHarvey a8c9fc1
PYTHON-4493 Remove broken SSL workaround in get_buffer
ShaneHarvey f5cbce0
PYTHON-4493 Remove unused buffer size arg, await future in close()
ShaneHarvey 993de69
PYTHON-4493 Add workaround for SSL ProtocolError issues
ShaneHarvey b69688b
Call transport.close instead of connection_lost
NoahStapp 506527f
Test removing transport.is_closing check
NoahStapp 988ee60
Resume reading only in read
NoahStapp 7006cf4
Don't store request_id
NoahStapp 712024c
Merge branch 'master' into PYTHON-4493-prod
NoahStapp 78a2cd7
Address review
NoahStapp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we split this change into its own ticket and add a test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I was using this change for more helpful debugging but this should be shifted into a separate fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tracked in PYTHON-5214.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping.