Skip to content

PYTHON-4636 Always remove reader/writer callbacks#1

Merged
NoahStapp merged 1 commit intoNoahStapp:PYTHON-4636from
ShaneHarvey:PYTHON-4636-fix-remove-reader-writer
Oct 3, 2024
Merged

PYTHON-4636 Always remove reader/writer callbacks#1
NoahStapp merged 1 commit intoNoahStapp:PYTHON-4636from
ShaneHarvey:PYTHON-4636-fix-remove-reader-writer

Conversation

@ShaneHarvey
Copy link

@ShaneHarvey ShaneHarvey commented Oct 3, 2024

PYTHON-4636 Always remove reader/writer callbacks

Fixes test_find_raw_retryable_reads. This test was failing when a previous task failed to remove its reader/writer callbacks, leading to the same file descriptor being added twice. Because FDs are recycled the stale callback consumes the event when trying to read from the newly opened FD. The fix is to always remove the callbacks even when the task is cancelled (ie when await fut raises).

@NoahStapp NoahStapp merged commit 4ddb553 into NoahStapp:PYTHON-4636 Oct 3, 2024
@ShaneHarvey ShaneHarvey deleted the PYTHON-4636-fix-remove-reader-writer branch October 3, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants