Conversation
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.
Addresses review finding R35.
Deleting a related entity from
EntityUnobserved, or transferring another entity fromEntityOwnershipLost, modifies the outgoing collection whileTick()is enumerating it. The next iterator advance throws outside event exception handling, leaving the tick partially processed.Capture deletion and ownership-transfer batches before outgoing lifecycle callbacks run. Consume each successful send before raising its event, retaining failed and unsent requests. New callback requests wait for the next tick, including transfers added during deletion callbacks. Existing requests retain their outgoing stage and transfer order. A live request identity check skips canceled or replaced transfers; replacing a request with identical entity and destination ids still creates new work for the next tick. The queues are no longer cleared after callbacks.
The deletion queue uses
ReferenceEqualityComparer.Instanceso its new live lookup and per-item removal remain valid when replicated values change afterDelete(), including changes from an earlier deletion callback. This is the exact one-line comparer change shared with R2/#6; the other R2 identity sets are outside this change.Validation
37f4e1ffb1d7fc3e7bcdea3dfbbd4484f9fe7516: 228/228 passed (155 runtime, 53 analyzer, 20 generator).InvalidOperationExceptionfrom the outgoingHashSet/Listenumerator. These include callbacks that throw after queuing more work.git diff --checkpassed. Tested on Windows with SDK 10.0.400 and .NET 8 runtime; the existingMemoryRelayTransport.cs:21CS8600 warning remains. The sandboxed restore hit NuGet TLS authentication failure; the authorized normal-TLS restore succeeded without changing dependencies or validation settings.Compatibility and integration
ProcessOutgoingMessages. When combining, retain itssessionVersionparameter, everyTrySendSessionMessagecall and false-return path, and everyIsCurrentSessioncheck. Remove a successful item only afterTrySendSessionMessagereturns true and beforeUnregisterEntity/RemoveOwnership; preserve the session check immediately after those callbacks. Keep the update, spawn, and rented-writer session guards and the session teardown queue clearing. A stale batch must never continue into a replacement session.Spawnvalidation edits the same partial class but a different entry method and should be retained when combining.Validation covers this independent branch and synchronous relay API callbacks. Combined PR execution, hosted CI, concurrent use, and arbitrary transport reentrancy were not tested. Retry checks use a transport that throws before accepting a packet; they do not imply acknowledged delivery when a transport fails after accepting bytes.
Base:
37f4e1ffb1d7fc3e7bcdea3dfbbd4484f9fe7516. Commit:fda108b8d848c8cfce4c9af736bc59916b74420fonfix/review-r35.