New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 769526 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Fix semantics of DISABLE_CONNECTION_MIGRATION load flag in QUIC

Project Member Reported by jri@chromium.org, Sep 27 2017

Issue description

This load flag currently disallows connection migration on existing connections. This is fine in the world where once a connection has migrated, no new streams are created in it. With new changes, we will allow for a connection to continue creating new streams after a connection has migrated. In this new world, a request with this load flag may cause a new stream to be created on an already-migrated connection.

We should return an error (probably on stream creation) if such a request is attempted on a connection that has migrated away from the default network.
 
Had an offline discussion with Jana. 

To clarify, DISABLE_CONNECTION_MIGRATION is per request load flag, and initially was designed to provide an API for applications to specify whether a request is migratable if connection migration is enabled.

By saying "if such a request is attempted on a connection that has migrated away from the default network", we are saying if a request is issued after connection migration completes and the connection is no longer on the default network interface, the stream should not be created. 

Comment 2 by rch@chromium.org, Sep 28 2017

Sounds right to me!
This is not affecting the current world, as migrated sessions are marked as going away, thus no new stream could be created on the migrated sessions. 

However this will be triggered once we move to the connection migration v2 as successfully migrated sessions won't be marked as going away and continue to serve new requests. This bug should be fixed when connection migration v2 is implemented.
Labels: -Pri-3 OS-Android Pri-2
Currently load flags are only checked when connection migration is *being triggered*. For new requests with load flag, if the session has finished connection migration to a different network, the load flag is ignored. 

For example, 
t0: default network is Wifi, app filed a request R1 with no load flag
t1: when serving R1, path degrading is detected, because the request is migratable, QUIC migrates to Cellular.
t2: default network is still Wifi, app filed a new request R2 with load flag: DISABLE_CONNECTION_MIGRATION as it aimed to avoid using Cellular network.
t3: R2 is served in QUIC session, and load flag is not checked, ended up using Cellular network. 
Cc: mdumitrescu@google.com
If we kept using DISABLE_CONNECTION_MIGRATION, the App's ignorance of real network being used by QUIC (cronet currently is not supporting network feedback to app) becomes an issue.

To solve the problem, it'd nice to introduce/convert a new load flag: DO_NOT_USE_CELLUAR. The app attach the load flag if they don't want to use cellular network, and QUIC layer will always check the connection type when serve a new request or when connection migration is triggered as well. 
Project Member

Comment 6 by bugdroid1@chromium.org, Jul 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bb28b1fecc57d07994d4d46d615de39e76267a1e

commit bb28b1fecc57d07994d4d46d615de39e76267a1e
Author: Zhongyi Shi <zhongyi@chromium.org>
Date: Wed Jul 18 02:41:26 2018

Rename the load flag LOAD_DISABLE_CONNECTION_MIGRATION_TO_CELLULAR to LOAD_DISABLE_CONNECTION_MIGRATION_TO_CELLULAR.

This CL does not change the behavior of the flag, it merely renames the flag to reflect the semantics we would like it to have. A subsequent CL will make the behavior changes.

Bug: 769526
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I6261e60fb44661a9b3de944e8f87bd660caeb761
Reviewed-on: https://chromium-review.googlesource.com/1136972
Commit-Queue: Zhongyi Shi <zhongyi@chromium.org>
Reviewed-by: Ryan Hamilton <rch@chromium.org>
Reviewed-by: Misha Efimov <mef@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575914}
[modify] https://crrev.com/bb28b1fecc57d07994d4d46d615de39e76267a1e/components/cronet/android/test/cronet_url_request_test.cc
[modify] https://crrev.com/bb28b1fecc57d07994d4d46d615de39e76267a1e/components/cronet/cronet_url_request.cc
[modify] https://crrev.com/bb28b1fecc57d07994d4d46d615de39e76267a1e/net/base/load_flags_list.h
[modify] https://crrev.com/bb28b1fecc57d07994d4d46d615de39e76267a1e/net/quic/chromium/quic_chromium_client_session.cc
[modify] https://crrev.com/bb28b1fecc57d07994d4d46d615de39e76267a1e/net/quic/chromium/quic_chromium_client_stream.cc
[modify] https://crrev.com/bb28b1fecc57d07994d4d46d615de39e76267a1e/net/quic/chromium/quic_chromium_client_stream.h
[modify] https://crrev.com/bb28b1fecc57d07994d4d46d615de39e76267a1e/net/quic/chromium/quic_http_stream.cc
[modify] https://crrev.com/bb28b1fecc57d07994d4d46d615de39e76267a1e/net/quic/chromium/quic_http_stream_test.cc
[modify] https://crrev.com/bb28b1fecc57d07994d4d46d615de39e76267a1e/net/quic/chromium/quic_stream_factory_test.cc

Sign in to add a comment