-
Notifications
You must be signed in to change notification settings - Fork 115
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
Mila/multi db #1321
Mila/multi db #1321
Conversation
Co-authored-by: Tom Andersen <tom-andersen@users.noreply.github.com>
…pp-sdk into mila/MultiDB
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.
LGTM
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.
Close to LGTM!
I do want to see less usage of const char*
though, we should try to avoid raw pointers, especially when database id is not expensive to copy around.
firestore/integration_test_internal/src/util/locate_emulator.cc
Outdated
Show resolved
Hide resolved
* the given database ID. | ||
*/ | ||
static Firestore* GetInstance(::firebase::App* app, | ||
const char* db_name, |
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.
I dont have the API proposal at hand, but what is the reason to use const char*
here instead of a const std::string&
?
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.
In the original API proposal , it was const std::string&
, and later requested to be changed to const char*
. I am not sure why.
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.
OK, at least we should find out why. I suppose there is a reason they asked for this.
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.
LGTM, good work!
❌ Integration test FAILEDRequested by @milaGGL on commit 35f554b
Add flaky tests to go/fpl-cpp-flake-tracker |
Add multiDB support.
Ported from:
TODO:
Firestore::GetInstance
public interface to accept dynamic database namestd::pair<App*, std::string>
as key instead ofApp*
, to identify DBs in the same app while creating and deleting firestore instances.TestFirestoreWithDatabaseId
andIsUsingFirestoreEmulator
test helper method- New
GetInstance
method call verification- Instances' equality check
- Can create & terminate multiple Firestore instances
- Can create and fetch documents from different Firestore instances offline and online