| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Codecov Report
@@ Coverage Diff @@
## master #805 +/- ##
============================================
- Coverage 78.76% 78.68% -0.08%
- Complexity 1126 1146 +20
============================================
Files 200 202 +2
Lines 4983 5091 +108
Branches 398 405 +7
============================================
+ Hits 3925 4006 +81
- Misses 888 912 +24
- Partials 170 173 +3
Continue to review full report at Codecov.
|
Sorry, something went wrong.
| // if executorService is available, create RefreshingManagedChannel that will get refreshed. | ||
| // otherwise create with regular ManagedChannel |
There was a problem hiding this comment.
Under what circumstances is the executor not available?
Sorry, something went wrong.
There was a problem hiding this comment.
the executor is not available when we want to create a channel pool that's non-refreshing. InstantiatingGrpcChannelProvider creates a channel pool with a null executorService if channelPrimer is not set. See https://github.com/googleapis/gax-java/pull/805/files#diff-25ba434a47d99bcc0b998965a298661cR208-R211.
I suppose we could make every channel pool refresh regardless of whether channelPrimer is set. But that means the channel will refresh at whatever rate we specify in RefreshingManagedChannel and not when the server resets. I'm not sure if this is a desired outcome if the clients don't specify anything.
Sorry, something went wrong.
There was a problem hiding this comment.
I think it's ok to make the behavior configureable and off by default. But i don't think we should make it dependent on the presence of an executor service. It's a bit surprising. Maybe add 2 factory methods:
create(int poolSize, ChannelFactory channelFactory)
createRefreshing(int poolSize, ChannelFactory channelFactory, ScheduledExecutorService executor)
Sorry, something went wrong.
There was a problem hiding this comment.
This comment seems stale
Sorry, something went wrong.
There was a problem hiding this comment.
This is looking good, I think all race conditions have been addressed. Most comments are cosmetic
Sorry, something went wrong.
| // if executorService is available, create RefreshingManagedChannel that will get refreshed. | ||
| // otherwise create with regular ManagedChannel |
There was a problem hiding this comment.
I think it's ok to make the behavior configureable and off by default. But i don't think we should make it dependent on the presence of an executor service. It's a bit surprising. Maybe add 2 factory methods:
create(int poolSize, ChannelFactory channelFactory)
createRefreshing(int poolSize, ChannelFactory channelFactory, ScheduledExecutorService executor)
Sorry, something went wrong.
There was a problem hiding this comment.
This is looking good! I have a few more comments on style though:
Sorry, something went wrong.
| // if executorService is available, create RefreshingManagedChannel that will get refreshed. | ||
| // otherwise create with regular ManagedChannel |
There was a problem hiding this comment.
This comment seems stale
Sorry, something went wrong.
There was a problem hiding this comment.
I don't remember most of the context here, unfortunately. Just a few sudo-nitpicking comments from me. Overall looks good.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. @vam-google, if this looks good to you, I think we can merge
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #805 +/- ##
===========================================
- Coverage 78.76% 78.67% -0.1%
- Complexity 1126 1144 +18
===========================================
Files 200 202 +2
Lines 4983 5092 +109
Branches 398 404 +6
===========================================
+ Hits 3925 4006 +81
- Misses 888 912 +24
- Partials 170 174 +4
Continue to review full report at Codecov.
|
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
There was a problem hiding this comment.
one last nit, but ready merge after
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This address #804
ChannelPool is modified to managed the lifecycle of its channels, including the initial creation and periodically creating new channels and replacing old channels.
ChannelPrimer will be implemented by the clients to choose what they want to do during channel creation to prime the channel.
InstantiatingGrpcChannelProvider adds the ability to create ChannelPools that will refresh its channels. If ChannelPrimer is not provided, ChannelPool will not refresh its connection, and the functionality will be exactly the same as before.