Commit c580bc5
Attach drain-observer when invalidate cancels prior pending drain
connection.py:1740-1742 cancelled the prior _pending_drain task and
overwrote the slot WITHOUT attaching _observe_drain_exception.
Every other cancel-and-detach site in the package (cluster.py:1134,
cluster.py:1863, connection.py:1450-1453) attaches the observer to
consume any non-CancelledError via task.exception() — without it,
asyncio's task-finalisation logger emits
"Task exception was never retrieved" at GC.
In practice _bounded_drain swallows Exception so today's orphan
only carries CancelledError (silent). The fix is INSURANCE for
future refactors that loosen the suppress scope. Symmetric
discipline with the four sibling sites.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d0dbd94 commit c580bc5
1 file changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1739 | 1739 | | |
1740 | 1740 | | |
1741 | 1741 | | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
1742 | 1755 | | |
1743 | 1756 | | |
1744 | 1757 | | |
| |||
0 commit comments