Conversation
…iddleware reflection Replace per-iteration asyncio.wait fan-out across O(P) head tasks with a single asyncio.Event set from each user task's done-callback (registered when the committer absorbs the task). Pending lists are now maintained in offset order via bisect.insort on the rare out-of-order arrival path, so _extract_ready_prefixes no longer sorts on every commit. Drop redundant per-task exception logging in _commit_partitions (handler's _finish_task already logs once with the right context). Cache type(consumer).__name__ and _enable_auto_commit per-consumer in a WeakKeyDictionary so the middleware doesn't re-evaluate on every message. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Removed in the same change that dropped per-task exception logging in _commit_partitions — nothing reads MockAsyncioTask.exception() anymore. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The test exited the drive loop on the first commit and asserted on the last call, but depending on scheduling the streaming committer can issue a partial commit at offset 11 (only fast0 done) before fast1 lands in pending. That partial commit is correct behavior — across-batch pipelining streams whatever's done — but the test was racing it against the assertion. Wait for the final outcome (offset 12) to actually appear in the call history and use assert_any_call. Surfaced as a Python 3.14 CI failure; the same race exists in 3.13 but lost the coin flip less often. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
No description provided.