Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(428)

Issue 2069493002: Do not switch best connection on the controlled side too frequently (Closed)

Created:
4 years, 6 months ago by honghaiz3
Modified:
4 years, 6 months ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, juberti1
Base URL:
https://chromium.googlesource.com/external/webrtc@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Do not switch best connection on the controlled side too frequently due to the nomination from the controlling side. We now use a single rule to determine connection switch on the controlled side. The rule is to select the new best connection based on the following order: 1. writable/receiving/connected state. 2. nominated 3. last time receiving data packet. 4. priority. 5. latency (rtt) BUG= R=deadbeef@webrtc.org, pthatcher@webrtc.org Committed: https://crrev.com/572b094128c4def38dd9f21a4df9e1dd72787fe9 Cr-Commit-Position: refs/heads/master@{#13274}

Patch Set 1 : #

Total comments: 12

Patch Set 2 : Add tests #

Total comments: 45

Patch Set 3 : Address comments #

Total comments: 10

Patch Set 4 : . #

Patch Set 5 : Updates a comment #

Total comments: 55

Patch Set 6 : Address comments #

Patch Set 7 : Merge with head #

Total comments: 2

Patch Set 8 : address Taylor's comments #

Total comments: 10

Patch Set 9 : Removed the change in port.cc #

Patch Set 10 : Changed a comment about pruning. #

Patch Set 11 : Using a_is_better and b_is_better to replace 1 and -1 for connection comparision #

Total comments: 2

Patch Set 12 : Merge again #

Patch Set 13 : . #

Patch Set 14 : Small fix after merge #

Patch Set 15 : Merge branch 'master' into nominate_on_controlled_side #

Unified diffs Side-by-side diffs Delta from patch set Stats (+588 lines, -348 lines) Patch
M webrtc/p2p/base/p2ptransportchannel.h View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +14 lines, -10 lines 0 comments Download
M webrtc/p2p/base/p2ptransportchannel.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 29 chunks +204 lines, -160 lines 0 comments Download
M webrtc/p2p/base/p2ptransportchannel_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 46 chunks +368 lines, -178 lines 0 comments Download
M webrtc/p2p/base/port.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 50 (21 generated)
honghaiz3
I still need to add the tests yet. It will great if you can take ...
4 years, 6 months ago (2016-06-14 02:41:48 UTC) #6
honghaiz3
Added tests. PTAL.
4 years, 6 months ago (2016-06-14 23:15:05 UTC) #8
honghaiz3
https://codereview.webrtc.org/2069493002/diff/100001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2069493002/diff/100001/webrtc/p2p/base/p2ptransportchannel.cc#newcode211 webrtc/p2p/base/p2ptransportchannel.cc:211: // iii) the new connection has been nominated twice ...
4 years, 6 months ago (2016-06-14 23:18:27 UTC) #9
pthatcher1
https://codereview.webrtc.org/2069493002/diff/80001/webrtc/p2p/base/p2ptransportchannel.h File webrtc/p2p/base/p2ptransportchannel.h (right): https://codereview.webrtc.org/2069493002/diff/80001/webrtc/p2p/base/p2ptransportchannel.h#newcode311 webrtc/p2p/base/p2ptransportchannel.h:311: Connection* best_connection_ = nullptr; Can we just start calling ...
4 years, 6 months ago (2016-06-15 21:59:53 UTC) #10
honghaiz3
Only Discuss one comment. https://codereview.webrtc.org/2069493002/diff/100001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2069493002/diff/100001/webrtc/p2p/base/p2ptransportchannel.cc#newcode224 webrtc/p2p/base/p2ptransportchannel.cc:224: } On 2016/06/15 21:59:53, pthatcher1 ...
4 years, 6 months ago (2016-06-16 01:13:09 UTC) #11
honghaiz3
On 2016/06/16 01:13:09, honghaiz3 wrote: > Only Discuss one comment. > > https://codereview.webrtc.org/2069493002/diff/100001/webrtc/p2p/base/p2ptransportchannel.cc > File ...
4 years, 6 months ago (2016-06-16 01:14:05 UTC) #12
honghaiz3
PTAL. https://codereview.webrtc.org/2069493002/diff/80001/webrtc/p2p/base/p2ptransportchannel.h File webrtc/p2p/base/p2ptransportchannel.h (right): https://codereview.webrtc.org/2069493002/diff/80001/webrtc/p2p/base/p2ptransportchannel.h#newcode311 webrtc/p2p/base/p2ptransportchannel.h:311: Connection* best_connection_ = nullptr; On 2016/06/15 21:59:52, pthatcher1 ...
4 years, 6 months ago (2016-06-16 23:03:49 UTC) #16
pthatcher1
The biggest change I'd like to see is to have one ShouldSwitchSelectedConnection that is all ...
4 years, 6 months ago (2016-06-17 00:27:12 UTC) #18
honghaiz3
I have made all logic for Switching connection the same now. Sorting also used the ...
4 years, 6 months ago (2016-06-17 19:18:18 UTC) #19
pthatcher1
That looks so much better. Just some minor things now. https://codereview.webrtc.org/2069493002/diff/200001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2069493002/diff/200001/webrtc/p2p/base/p2ptransportchannel.cc#newcode230 ...
4 years, 6 months ago (2016-06-21 07:16:53 UTC) #20
Taylor Brandstetter
https://codereview.webrtc.org/2069493002/diff/200001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2069493002/diff/200001/webrtc/p2p/base/p2ptransportchannel.cc#newcode256 webrtc/p2p/base/p2ptransportchannel.cc:256: if (a->last_data_received() > b->last_data_received()) { What happens if the ...
4 years, 6 months ago (2016-06-21 18:33:26 UTC) #21
Taylor Brandstetter
4 years, 6 months ago (2016-06-21 18:33:28 UTC) #22
Taylor Brandstetter
Also, can you fix the formatting of the CL description? And subheading "2)" includes two ...
4 years, 6 months ago (2016-06-21 18:37:00 UTC) #23
pthatcher1
I think Taylor is right that we need to be careful with when we prune, ...
4 years, 6 months ago (2016-06-22 06:36:34 UTC) #25
honghaiz3
PTAL. https://codereview.webrtc.org/2069493002/diff/160001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2069493002/diff/160001/webrtc/p2p/base/p2ptransportchannel.cc#newcode1129 webrtc/p2p/base/p2ptransportchannel.cc:1129: LOG(LS_INFO) << "Switching selected connection after sorting: " ...
4 years, 6 months ago (2016-06-22 08:03:17 UTC) #27
Taylor Brandstetter
lgtm https://codereview.webrtc.org/2069493002/diff/200001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2069493002/diff/200001/webrtc/p2p/base/p2ptransportchannel.cc#newcode1174 webrtc/p2p/base/p2ptransportchannel.cc:1174: (CompareConnectionsBase(premier, conn) >= 0)) { On 2016/06/22 06:36:33, ...
4 years, 6 months ago (2016-06-22 16:12:23 UTC) #28
honghaiz3
https://codereview.webrtc.org/2069493002/diff/260001/webrtc/p2p/base/p2ptransportchannel_unittest.cc File webrtc/p2p/base/p2ptransportchannel_unittest.cc (right): https://codereview.webrtc.org/2069493002/diff/260001/webrtc/p2p/base/p2ptransportchannel_unittest.cc#newcode2901 webrtc/p2p/base/p2ptransportchannel_unittest.cc:2901: EXPECT_TRUE(!conn2->pruned()); On 2016/06/22 16:12:23, Taylor Brandstetter wrote: > EXPECT_FALSE? ...
4 years, 6 months ago (2016-06-22 16:29:28 UTC) #29
pthatcher1
It all looks good, except I still don't understand or don't like (or both) the ...
4 years, 6 months ago (2016-06-22 19:18:38 UTC) #30
honghaiz3
Removed the part for un-pruning. Leave it at a separate CL. https://codereview.webrtc.org/2069493002/diff/280001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): ...
4 years, 6 months ago (2016-06-22 20:01:24 UTC) #31
honghaiz3
4 years, 6 months ago (2016-06-22 20:12:00 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2069493002/320001
4 years, 6 months ago (2016-06-22 20:59:35 UTC) #35
honghaiz3
Use a_is_better, b_is_better to replace 1 and -1 for better readability.
4 years, 6 months ago (2016-06-22 22:19:07 UTC) #37
pthatcher1
lgtm https://codereview.webrtc.org/2069493002/diff/340001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2069493002/diff/340001/webrtc/p2p/base/p2ptransportchannel.cc#newcode262 webrtc/p2p/base/p2ptransportchannel.cc:262: } These could use the a_is_better, b_is_better.
4 years, 6 months ago (2016-06-22 22:32:32 UTC) #38
honghaiz3
https://codereview.webrtc.org/2069493002/diff/340001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2069493002/diff/340001/webrtc/p2p/base/p2ptransportchannel.cc#newcode262 webrtc/p2p/base/p2ptransportchannel.cc:262: } On 2016/06/22 22:32:32, pthatcher1 wrote: > These could ...
4 years, 6 months ago (2016-06-23 18:29:23 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2069493002/420001
4 years, 6 months ago (2016-06-23 18:29:43 UTC) #42
commit-bot: I haz the power
Failed to apply the patch.
4 years, 6 months ago (2016-06-23 19:27:37 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2069493002/420001
4 years, 6 months ago (2016-06-23 19:33:50 UTC) #46
commit-bot: I haz the power
Failed to apply the patch.
4 years, 6 months ago (2016-06-23 19:35:23 UTC) #48
commit-bot: I haz the power
4 years, 6 months ago (2016-06-23 19:38:43 UTC) #50
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/572b094128c4def38dd9f21a4df9e1dd72787fe9
Cr-Commit-Position: refs/heads/master@{#13274}

Powered by Google App Engine
This is Rietveld 408576698