PYTHON-5215 Add an asyncio.Protocol implementation for KMS#2460
PYTHON-5215 Add an asyncio.Protocol implementation for KMS#2460blink1073 merged 37 commits intomongodb:masterfrom
Conversation
|
I'm debugging two failures: |
|
I realized the benchmark test wasn't actually triggering the protocol -> I'm tweaking things locally |
The actual sizehint in practice was on the order of the bytes being read from the buffer (typically less than 1000). Using the buffered protocol at all here is a bit of a mismatch imho. |
How long would refactoring to not use buffered take? No reason to use the lower-level API if we don't need to. |
It's actually dead simple, I did it along the way when I was debugging a race condition. |
I'll push a commit in the morning for comparison, we can always revert. |
|
I'm happy with the simplification. The tests are passing locally, this is ready for another look. |
|
Full patch build: https://spruce.mongodb.com/version/689f5483e112170007b0ce9f/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC I updated the timings in the PR description, there no significant change. |
|
Okay there is one legit bug in |
|
Here's a new patch build, failures are existing flakiness issues or tracked in PYTHON-5502. |
|
|
||
|
|
||
| class Connection: | ||
| class BaseConnection: |
There was a problem hiding this comment.
We don't utilize any of the BaseConnection abstractions for the sync API, correct? The change is purely for compatibility with the async API?
There was a problem hiding this comment.
No it is used by both sync and async KMS, it is what gets returned by the _connect_kms helper function.
There was a problem hiding this comment.
I meant that we don't have a separate KMS networking interface for sync. Just wanted to confirm my understanding.
|
I had to fix merge conflicts |
…ongodb#2460)" This reverts commit e4b7eb5.
See benchmark gist.
Benchmark Results:
Before:
4.93s, 5.26sAfter:
4.93s,5.05sDepends on mongodb-labs/drivers-evergreen-tools#679