java-control-plane icon indicating copy to clipboard operation
java-control-plane copied to clipboard

Make DiscoveryServer stream ID global

Open smtilden opened this issue 4 years ago • 6 comments

smtilden avatar Dec 16 '20 19:12 smtilden

When surfacing V2 and V3 streams alongside each other in envoy-control,
DiscoveryServerCallbacks are unable to differentiate between V2 & V3 ADS
upon onStreamClose(), onStreamCloseWithError().

This means that any DiscoveryServerCallback that keeps state cannot pivot
on stream IDs, since there will be duplicate between V2 & V3. This change
creates a global StreamCounter, which ensures stream IDs will be unique
across V2 & V3 streams.

smtilden avatar Dec 16 '20 20:12 smtilden

Codecov Report

Merging #157 (91da9e9) into master (ff834cb) will decrease coverage by 0.07%. The diff coverage is 75.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #157      +/-   ##
============================================
- Coverage     88.22%   88.15%   -0.08%     
- Complexity      298      300       +2     
============================================
  Files            31       32       +1     
  Lines           977      979       +2     
  Branches         78       78              
============================================
+ Hits            862      863       +1     
- Misses           85       86       +1     
  Partials         30       30              
Impacted Files Coverage Δ Complexity Δ
.../envoyproxy/controlplane/server/StreamCounter.java 66.66% <66.66%> (ø) 2.00 <2.00> (?)
...nvoyproxy/controlplane/server/DiscoveryServer.java 100.00% <100.00%> (ø) 6.00 <3.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ff834cb...91da9e9. Read the comment docs.

codecov-io avatar Dec 16 '20 21:12 codecov-io

I will look at it tomorrow, if you're in a hurry then go for it.

slonka avatar Feb 21 '21 19:02 slonka

@jakubdyszkiewicz do you want to release it or should I?

slonka avatar Mar 08 '21 12:03 slonka

@slonka looks like we should probably merge this? is your approval still good?

mpuncel avatar Jan 03 '23 20:01 mpuncel

@mpuncel - yeah 👍 - I just did not release it because the release process was broken at the time. If it's fixed then go ahead.

slonka avatar Jan 04 '23 08:01 slonka