Skip to content
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

Add the state machine of updating custom installation id in the local cache and update to Firebase Segmentation backend. #545

Merged
merged 26 commits into from
Jun 24, 2019

Conversation

diwu-arete
Copy link
Contributor

@diwu-arete diwu-arete commented Jun 19, 2019

Close review needed for FirebaseSegmentation.java

CL also contains unit tests.
The http client is not implemented yet.

cache and update to Firebase Segmentation backend. CL also contains unit
tests.
(The http client is not implemented yet.)
@diwu-arete
Copy link
Contributor Author

This is a pretty large PR, but the key part is just FirebaseSegmentation.java which needs a close review.

@diwu-arete
Copy link
Contributor Author

/retest

@diwu-arete
Copy link
Contributor Author

/retest

@diwu-arete diwu-arete self-assigned this Jun 20, 2019
@@ -55,7 +79,161 @@ public static FirebaseSegmentation getInstance(@NonNull FirebaseApp app) {
return app.get(FirebaseSegmentation.class);
}

Task<Void> setCustomInstallationId(String customInstallationId) {
return Tasks.forResult(null);
Task<Void> setCustomInstallationId(@Nullable String customInstallationId) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the return type be @NonNull public Task<Void> instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also what are the thread-safety/concurrency requirements for this method(including the ones it calls)? I looks like multiple calls to this from different threads could lead to races

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Yes, definitely it should be nonnull public

  2. Change it to be synchronized

@diwu-arete diwu-arete merged commit e7fb811 into floc-master Jun 24, 2019
@firebase firebase locked and limited conversation to collaborators Oct 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants