This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 473
Closes #6354 - Take Lazy references to storage in FennecMigrator #6395
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grigoryk
force-pushed
the
lazyMigrationInit
branch
from
March 26, 2020 00:30
7de908a
to
68c279b
Compare
4 tasks
Codecov Report
@@ Coverage Diff @@
## master #6395 +/- ##
============================================
+ Coverage 78.58% 78.73% +0.15%
+ Complexity 4626 4597 -29
============================================
Files 610 612 +2
Lines 22200 22126 -74
Branches 3253 3212 -41
============================================
- Hits 17446 17422 -24
+ Misses 3418 3394 -24
+ Partials 1336 1310 -26
Continue to review full report at Codecov.
|
grigoryk
force-pushed
the
lazyMigrationInit
branch
from
March 26, 2020 00:58
68c279b
to
d10c9e2
Compare
jonalmeida
approved these changes
Mar 26, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
Leaving the merge to be synchronized with the breaking changes needed in Fenix.
Fenix PR, for when this is published in a nightly - mozilla-mobile/fenix#9417 |
bors r=jonalmeida |
Build succeeded |
grigoryk
pushed a commit
to grigoryk/android-components
that referenced
this pull request
May 13, 2020
This fixes fallback from mozilla-mobile#6395 in which FennecMigrator changed to accept a Lazy-wrapped reference to the account manager. This was done so that during regular (non-migrating) startup, a simple act of building a no-op migrator will not cause account manager initialization. However, during a migrating startup this creates a race to initialize account manager. Two participants in this race are: 1) FenixApplication running expensive operations (such as storage init, account manager init) after visual completeness. However, currently that just entails a 5 second delay from `onStart`. 2) FxA migration, which runs roughly at the mid-point of the migration. Account manager currently can't be initialized on a background thread (or it will crash). FxA migration runs on a background thread, so if (2) wins (that is, migrations before FxA migration take less than 5 seconds), then migration will crash. This patch adds an eager initialization right before we kick-off migrations but are still on the main thread, iff an FxA migration will be executed.
4 tasks
bors bot
pushed a commit
that referenced
this pull request
May 13, 2020
6964: Initialize accountManager on the main thread during migration r=pocmo a=grigoryk Fenix bug for this - mozilla-mobile/fenix#10432 This fixes fallout from #6395 in which FennecMigrator changed to accept a Lazy-wrapped reference to the account manager. This was done so that during regular (non-migrating) startup, a simple act of building a no-op migrator will not cause account manager initialization. However, during a migrating startup this creates a race to initialize account manager. Two participants in this race are: 1) FenixApplication running expensive operations (such as storage init, account manager init) after visual completeness. However, currently that just entails a 5 second delay from `onStart`. 2) FxA migration, which runs roughly at the mid-point of the migration. Account manager currently can't be initialized on a background thread (or it will crash). FxA migration runs on a background thread, so if (2) wins (that is, migrations before FxA migration take less than 5 seconds), then migration will crash. This patch adds an eager initialization right before we kick-off migrations but are still on the main thread, iff an FxA migration will be executed. Co-authored-by: Grisha Kruglov <gkruglov@mozilla.com>
pocmo
pushed a commit
that referenced
this pull request
May 13, 2020
This fixes fallback from #6395 in which FennecMigrator changed to accept a Lazy-wrapped reference to the account manager. This was done so that during regular (non-migrating) startup, a simple act of building a no-op migrator will not cause account manager initialization. However, during a migrating startup this creates a race to initialize account manager. Two participants in this race are: 1) FenixApplication running expensive operations (such as storage init, account manager init) after visual completeness. However, currently that just entails a 5 second delay from `onStart`. 2) FxA migration, which runs roughly at the mid-point of the migration. Account manager currently can't be initialized on a background thread (or it will crash). FxA migration runs on a background thread, so if (2) wins (that is, migrations before FxA migration take less than 5 seconds), then migration will crash. This patch adds an eager initialization right before we kick-off migrations but are still on the main thread, iff an FxA migration will be executed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a follow-up to #6304, in which I forget that FennecMigrator exists.
Pull Request checklist
After merge