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.
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
Integrate direct path/fan out logic #31504
Integrate direct path/fan out logic #31504
Changes from 12 commits
e990fb3
4022f20
ab51953
e6d61e1
ff09734
e7b544c
5c31658
af44fde
3205784
e480e82
ba1d134
50b5da6
c3ff2c3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class is now a little confusing, it is named stub and takes a single stub which is to a particular endpoint. But by exposing these methods we may be using a stream to another unrelated endpoint. I think that it would be better to extract the blocking for resources and metric tracking to a separate object that the MetricTrackingWindmilServerStub and the StreamingEngineClient could both use.
Something where you can get closables to track something would be convenient.
I think you could have something like
AutoClosable enterGetData() {
waitfor resources, increment counter, return closable that decrements
}
and then caller could do
try (enterGetData()) {
stream.getDataStream(...);
}
Perhaps that refactoring could be done in a separate PR which we can submit before this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sgtm might be helpful to include the work provider implementations we were talking about in a PR as well
then we don't need a nullable heartbeatSender and work committer and can hide those in the impls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update comment based upon heartbeat sender
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not setting active heartbeats to one here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe goes away with the refactoring, but this set(0) seems like it will hide leaked threads etc. It would be better to have the try/finally scoped just around various increments and just decrement the matching amount in finally. No max needed either then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as follow up might be nice if this returned a completable future instead of blocking, then we wouldn't have to have a thread blocked per-destination for heartbeats
Don't do in this PR, it's big enough. Could put todo for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done