-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AsyncStorage] multiGet breaking test and fix #5514
Conversation
By analyzing the blame information on this pull request, we identified @sahrens, @vjeux and @nicklockwood to be potential reviewers. |
@mvayngrib updated the pull request. |
// avoid fetching duplicates | ||
keys.forEach(key => { | ||
if (this._getKeys.indexOf(key) === -1) { | ||
this._getKeys.push(key) |
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.
semi: Missing semicolon.
aac0236
to
dde151a
Compare
@mvayngrib updated the pull request. |
@@ -225,7 +228,12 @@ var AsyncStorage = { | |||
}); | |||
|
|||
this._getRequests.push(getRequest); | |||
this._getKeys.push.apply(this._getKeys, keys); | |||
// avoid fetching duplicates | |||
keys.forEach(key => { |
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.
semi: Missing semicolon.
dde151a
to
be5c91b
Compare
@mvayngrib updated the pull request. |
cc @vjeux |
To anyone else that experiences this bug and is on an older version with unpatched AsyncStorage - you could just swap out your |
@mvayngrib thanks so much btw |
@niftylettuce you're welcome :) |
@facebook-github-bot shipit |
Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/1753159551581590/int_phab to review. |
52755fd
Summary: the flush + optimized multiGet result in an obscure bug that results when two multiGet requests with overlapping key sets get issued. The result array for both requests ends up bigger than the key array (because it has duplicates) Closes #5514 Reviewed By: svcscm Differential Revision: D2908264 Pulled By: nicklockwood fb-gh-sync-id: 60be1bce4acfc47083e4ae28bb8b63f9dfa56039
Summary: the flush + optimized multiGet result in an obscure bug that results when two multiGet requests with overlapping key sets get issued. The result array for both requests ends up bigger than the key array (because it has duplicates) Closes facebook#5514 Reviewed By: svcscm Differential Revision: D2908264 Pulled By: nicklockwood fb-gh-sync-id: 60be1bce4acfc47083e4ae28bb8b63f9dfa56039
Summary: the flush + optimized multiGet result in an obscure bug that results when two multiGet requests with overlapping key sets get issued. The result array for both requests ends up bigger than the key array (because it has duplicates) Closes facebook/react-native#5514 Reviewed By: svcscm Differential Revision: D2908264 Pulled By: nicklockwood fb-gh-sync-id: 60be1bce4acfc47083e4ae28bb8b63f9dfa56039
the flush + optimized multiGet result in an obscure bug that results when two multiGet requests with overlapping key sets get issued. The result array for both requests ends up bigger than the key array (because it has duplicates)