Repository navigation
Closed
Milestone
Description
- Implement async cancellation (Implement async cancellation #2437)
- Frontend timeouts for async methods (Frontend timeouts for async methods #607)
- Trigger backend cancellation when a (frontend) timeout occurs (Trigger backend cancellation when a (frontend) timeout occurs #1567)
- Timeouts not fully applied when opening connections (Timeouts not fully applied when opening connections #3227)
- Throw OperationCanceledException for cancellation instead of PostgresException (Trigger backend cancellation when a (frontend) timeout occurs #1567)
- Make an exception for a timeout of a sync query the same way as for an async one (Make an exception for a timeout of a sync query the same way as for an async one #3132)
- Handle timeouts for WaitAsync (Handle timeouts for WaitAsync #3140)
- Socket async cancellation and timeout during connection (Socket async cancellation and timeout during connection #2860)
- Disable cancellation on timeouts, if CancellationTimeout is -1 (Disable cancellation on timeouts, if CancellationTimeout is -1 #3208)
- ResettableCancellationTokenSource.Cancel (and CancelAfter) aren't threadsafe (ResettableCancellationTokenSource.Cancel (and CancelAfter) aren't threadsafe #3250)
- Populate the originating cancellation token in our OperationCanceledExceptions (Populate the originating cancellation token in our OperationCanceledExceptions #3252). Done for command execution, needs to be done for COPY/Wait.
- Cancel should not throw on pseudo-PostgreSQL servers which don't support it (Cancel should not throw on pseudo-PostgreSQL servers which don't support it #3245)
- Cancellation/timeout for NpgsqlDataReader.{GetFieldValueAsync,GetIsDBNull} (Cancellation/timeout for NpgsqlDataReader.{GetFieldValueAsync,GetIsDBNull} #3275). Probably can be punted.
- Timeout and cancellation for COPY operations (Timeout and cancellation for COPY operations #1328)
- Look into not passing the user cancellation token all the way down for cases where PG cancellation isn't needed (e.g. WaitAsync). Done as part of Refactor cancellation and timeout one more time :) #3318.
- After Socket async cancellation and timeout during connection #2860 adds timeout to ConnectAsync, we still need to make sure the cancellation token is flown across the connection path (e.g. auth).
Additional related tasks not done in 5.0 are tracked by #3346
/cc @vonzshik
Reacted by Thorsten Sommer and Brar Piening
Activity
vonzshik commentedon Sep 20, 2020
Multiplexing write loop - there are places, where we're ignoring the timeout cancellation token.
roji commentedon Sep 20, 2020
Good point @vonzshik. Though IMHO getting cancellation (and timeout) working for multiplexing in general is low-priority, as a new, experimental feature.
[-]Remaining tasks for cancellation[/-][+]Remaining tasks for cancellation / timeout[/+]vonzshik commentedon Sep 26, 2020
Also, something that came to my mind:
vonzshik commentedon Oct 22, 2020
I'm pretty sure the first one (#3187) isn't yet completed.
But the second one (#3142) is.
Also, the third one (#2860) is also done.
roji commentedon Oct 22, 2020
For WaitAsync, I still want to explore not passing down the cancellation token through all the layers, but to simply cancel the read buffer's token directly when the user token is triggered - this is a bit similar to auth cancellation.
The 3rd item can track remaining work on auth cancellation (as discussed in #3253 (comment)).
[-]Remaining tasks for cancellation / timeout[/-][+]Cancellation / timeout epic[/+][-]Cancellation / timeout epic[/-][+]Cancellation / timeout epic for 5.0[/+]