fix: count invalidated binder delivery failure - #954
Closed
LIghtJUNction wants to merge 4 commits into
Closed
Conversation
Invalidate asynchronous delivery work when module UIDs disappear or the module cache is reset, and scope death recipients to the Binder they watch. Bound the delivery workers and add regression coverage for duplicate, stale, and reset attempts. Signed-off-by: LIghtJUNction <lightjunction.me@gmail.com>
…very fix: prevent stale module binder deliveries
Canary publishing creates canary-* tags in the repository. Restrict the distribution version provider to stable v* tags so those generated tags cannot put a hyphenated canary name into artifact filenames and break the release workflow's field parsing. Run a verification task in Core CI against the checkout's real tags so a canary version selection fails before packaging.
Owner
|
Pause this pull-request until a real issue can be linked to it. We don't need AI-based improvements. |
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.
This pull request introduces a new mechanism for tracking and managing delivery attempts for module app services, replacing the previous approach based on a simple set of active uids. It adds a robust
DeliveryAttemptTrackerto handle concurrency, lifecycle invalidation, and stale attempt cleanup, and updates the service logic to use this tracker. Additionally, it improves reliability under failure conditions and adds unit tests for the new tracker. The Gradle build is also updated to include unit tests for the daemon module.Delivery attempt tracking and concurrency improvements:
DeliveryAttemptTracker, a new class that serializes delivery attempts per uid and safely invalidates or completes them across lifecycle changes and concurrency boundaries. This replaces the previoussendingset and ensures that only the correct, current attempt can affect state. (daemon/src/main/kotlin/org/matrix/vector/daemon/ipc/DeliveryAttemptTracker.kt)ModuleAppServiceto useDeliveryAttemptTrackerfor managing delivery attempts, including inuidStarts,uidGone, and delivery completion logic. This prevents race conditions, ensures proper cleanup, and avoids stale attempts from corrupting state. (daemon/src/main/kotlin/org/matrix/vector/daemon/ipc/ModuleAppService.kt) [1] [2] [3] [4]Thread pool and resource management:
daemon/src/main/kotlin/org/matrix/vector/daemon/ipc/ModuleAppService.kt)Reliability and failure handling:
daemon/src/main/kotlin/org/matrix/vector/daemon/ipc/ModuleAppService.kt)Testing and build system:
DeliveryAttemptTrackerto verify correct handling of duplicate starts, invalidation, stale attempts, and concurrency. (daemon/src/test/kotlin/org/matrix/vector/daemon/ipc/DeliveryAttemptTrackerTest.kt)daemon/build.gradle.kts,.github/workflows/core.yml) [1] [2]