Repository navigation
Accept a tray group's snapshots in one request - #1071
Merged
Merged
Conversation
A group's accept from the tray menu, or from a window attached to the queue, sent an accept per snapshot, and from the tray a listing after each: two round trips and a rewrite of the source file per snapshot, with each accept moving the lines under the keys still to send. AcceptKeys carries every key in one request, and each owner runs it as its accept-all batch over those keys, a source file at a time. An owner that predates the verb answers that it cannot read the request, and is sent an accept per snapshot as before.
This was referenced Nov 18, 2026
Bump DiffEngine from 21.0.0 to 21.1.0
NServiceBusCommunity/NServiceBus.Community.HandlerOrdering#439
Closed
This was referenced Nov 18, 2026
Merged
Merged
Closed
Merged
Closed
Merged
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.
What
Accepting a group's snapshots, from the tray's "Pending Snapshots (n)" button or from "Accept all in" a header in a window attached to the queue, now goes to the queue owner as one
AcceptKeysrequest with every key in it.Why
Both surfaces sent one
Acceptper snapshot, and the tray also sent aListafter each. That was two round trips plus a rewrite of the source file per snapshot. With one solution, the group is the whole queue, so a long queue was slow. Each accept also moves the lines under the keys still to be sent. The owner rebases pending entries after an accept, so a later snapshot in the same file could be found gone and skipped as already settled.How
ViewerVerb.AcceptKeys: the body is the keys, one per line (ViewerMessage.KeysBody/ReadKeys).IQueueOwner.AcceptKeysreturns the batch's message and whether any named snapshot is still pending unwritten. That covers not written, failed, or conflicted (a conflicted snapshot is never tried). The reply carries this asWritten. Tracked keys are left alone.ViewerSession.BeginAcceptKeysplusAcceptAllRunner.Drive(out tally). A batch already in flight is waited out first, asDiscardAlldoes.OwnedInlineHost.AcceptEverywith a key filter. Conflicts are counted within the group, not across the whole queue.Tracker.Accept(IEnumerable<PendingSnapshot>)calls the newIInlineHost.Accept(list, out message). When not everything landed, it raises one balloon, "Could not accept every snapshot. …".OwnerLink.AcceptGroupsends the snapshots as oneAcceptKeysand holds the deletes when the reply'sWrittenis false, as before.Compatibility
An owner that predates the verb fails to parse the request and answers
Unreadable request(nowViewerServer.UnreadableRequest).RemoteInlineHostandOwnerLinktake that as the cue to send oneAcceptper key, as before. A newer owner sent onlyAccepts by an older client behaves as it always did.Tests
ViewerProtocolTests.AnAcceptOfKeysCarriesThemAllAndSaysWhetherTheyWereWrittenTrackerSnapshotTest: a group is one request, a group that was not written reaches the balloon, and an older owner gets an accept eachOwnedInlineHostTest: an accept of keys takes those alone and counts the conflicts it was handed; with the real applier, a group lands in its file and a snapshot left out of it keeps its literalIpcTests.AcceptKeysTakesThoseAlone(viewer as owner)Locally (Debug), these pass: DiffEngineTray.Core.Tests, DiffEngineViewer.Tests,
ViewerProtocolTestsandTrayViewerSyncTest. The Release build has not been run locally.