-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pack] Enable ordering of RpcLog and InvocationResponse messages #9657
Merged
Conversation
This file contains 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
brettsam
changed the title
Enable ordering of RpcLog and InvocationResponse messages
[pack] Enable ordering of RpcLog and InvocationResponse messages
Nov 3, 2023
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
kshyju
reviewed
Nov 16, 2023
liliankasem
reviewed
Nov 28, 2023
kshyju
approved these changes
Dec 14, 2023
src/WebJobs.Script.Grpc/Channel/OrderedInvocationMessageDispatcher.cs
Outdated
Show resolved
Hide resolved
brettsam
force-pushed
the
brettsam/log_race
branch
from
December 22, 2023 18:43
0e91db6
to
15e9607
Compare
liliankasem
approved these changes
Jan 2, 2024
Hello Team, Could you please confirm whether the GitHub issue mentioned below will be addressed as part of this ongoing resolution? If so, kindly provide an estimated time of arrival (ETA). GitHub Issue: #9238 Thank you. |
9 tasks
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.
Note -- I have a few things left to cleanup, but this is ready for initial review while I make sure all tests pass CI.resolves #9238
This issue was introduced back when the GrpcChannel pipeline was refactored back in #8281. This change changed some behavior such that every message that came from the worker to the host via grpc was quickly queued on the ThreadPool for the fastest possible processing.
However, there are two message types that require ordering --
RpcLog
andInvocationResponse
:InvocationResponse
, we consider that invocation complete and remove the tracking context we had been using. This means that if we process a log after this, we have no information that theRpcLog
needs and we just drop it.This change special-cases these "InvocationMessages" and puts them through a per-invocation dispatcher. Internally this sticks these messages into a Channel and processes them via a background Task. This processing ensures they are processed in order, at the expense of running as fast-as-possible on all Threads.
This is currently hidden behind both a stamp-level setting and a FeatureFlag. Once in, we can enable for entire stamps and gather perf numbers, etc, then slowly roll out once we're comfortable. Customers that want to try sooner can set the flag themselves for their app.
Once we're confident in the change, we'll remove this completely and everyone will use this new dispatcher method.
Pull request checklist
release_notes.md