Repository navigation
Conversation
Accept an optional per-operation Amp cancellation token and retain it through HTTP requests, buffered bodies and streamed payload reads. Release body resources and cancellation subscriptions when consumption ends. Existing callers remain compatible; interface implementations and overriding subclasses must add the optional argument.
Require amphp/pipeline ^1.2.1 to exclude the confirmed pending-read double-resolution defect. Preserve the per-operation cancellation behavior and improve retained-response, stream-notification and abandoned-stream cleanup proof. Correct static-analysis and style contracts without changing the declared generic format types; isolate the reproduced Parts snippet false positive to one exact diagnostic.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #350 +/- ##
==========================================
+ Coverage 96.43% 96.76% +0.33%
==========================================
Files 43 44 +1
Lines 953 1082 +129
==========================================
+ Hits 919 1047 +128
- Misses 34 35 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Async operations need a per-operation way to stop HTTP work without rebuilding the client or duplicating its transport logic.
All four async select methods now accept an optional Amp cancellation token. It applies to the request, buffered response bodies, and later reads of a returned payload, including reads made without another token. Explicit read tokens are combined with the operation token. Closing, EOF, cancellation, and terminal failures release the owned resources and subscriptions.
The implementation requires amphp/pipeline 1.2.1 or later, which fixes a double-resolution defect when cancellation and stream closure affect the same pending read.
Existing calls remain compatible. Implementations of ClickHouseAsyncClient and subclasses overriding these methods must add the optional argument and forward it when delegating. Cancellation stops client I/O; it does not guarantee that ClickHouse has stopped executing the query.