USS: Stopping a data type that was already stopping overrides the shutdown reason |
|||
Issue descriptionThis bug was pointed out by treib@ on crrev.com/1290149. When ModelAssociationManager receives a stop call, it simply forwards the call to the DataTypeControllers, irrespective of whether they were already stopping. This overrides the ShutdownReason, which means that the MetadataFate gets overridden. This means that if you disable sync, and then sync stops for any other reason (like browser shutdown), the metadata may be left behind.
,
Oct 22
No :) Marking it P2 because this should trigger relatively rarely, and is not a regression.
,
Oct 24
Can you please elaborate the actual issue? The original description doesn't seem very accurate, because ModelTypeController will *NOT* override, and instead will use the first. For sync metadata to leak, you'd need to stop-sync (without clearing metadata) and follow up (while stopping) with disable-sync (which should clear metadata). This doesn't seem very realistic. For other related cases like multiple stop requests during startup, which is more likely because starting up is slower than stopping, ModelTypeController is quite smart: https://cs.chromium.org/chromium/src/components/sync/driver/model_type_controller.cc?l=255&rcl=63e884a4aa694069d5ab1e6b3431b7b1b12e6f23
,
Oct 24
Let me try to rephrase and give more details. You're correct that MTC will use the first rather than the last reason, but it's still the same problem, no? I do agree that it's not very likely, but it's still something we don't handle. Anyway, the more serious problem is receiving a CLEAR_DATA request when a MTC is already stopped: E.g. the user turns off the Sync toggle on Android. Sync gets turned off, but we leave the metadata behind. Later (might be much later), the user signs out, resulting in a CLEAR_DATA request. Since the controller isn't running we just ignore it and leave the metadata around forever.
,
Jan 14
No updates here, but adding 902704 as dependency because it's very unlikely that we do any improvements to datatype controllers without getting rid of directory controllers first. |
|||
►
Sign in to add a comment |
|||
Comment 1 by jkrcal@chromium.org
, Oct 22