| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
(#958)
Port of https://github.com/firebase/firebase-js-sdk/pull/564.
|
| |
|
|\
| |
| | |
Release 4.11.0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* naively remove FSTPath import and source/test files.
* port FieldPath, part I
* port FieldPath, part II
* port ResourcePath, part I
* port ResourcePath, part II
* the grand commit to fix build errors
* use testutil:: helper instead of those from FSTHelpers
* fix test and lint
* use c_str in errmsg directly
* fix
* fix
* make code clean
* fix integration test I missed
* fix to avoid naming collision in preprocessor
* address changes
* address changes
* address changes
* fix: fieldMask are actually shared with different context.
* address changes
* add converter function between two DocumentKey implementations
* add unit test
* address changes
* fix lint
* using DocumentKey in model except for the container types `FSTDocumentDictionary`, `FSTDocumentKeySet`, and `FSTDocumentVersionDictionary`
* change other place w.r.t. the use of `DocumentKey` in model
* update parameter of test helpers from NSString to string_view
* revert a temporary change used in debug
* address changes
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Start work on leveldb transactions
* Style
* Working API. Not plumbed in yet
* Move files into correct place
* Wrangling file locations and associations
* Tests pass
* Add some comments
* style
* Fix copyright
* Rewrite iterator internals to handle deletion-while-iterating. Also add tests for same
* Switch to strings instead of slices
* Style
* More style fixes
* Response to feedback before updating docs
* Style
* Add comment
* Initialize version_
* Satisfy the linter
* Fix style
* snake_case
* More snakes
* LevelDBTransaction -> LevelDbTransaction
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* naively remove FSTPath import and source/test files.
* port FieldPath, part I
* port FieldPath, part II
* port ResourcePath, part I
* port ResourcePath, part II
* the grand commit to fix build errors
* use testutil:: helper instead of those from FSTHelpers
* fix test and lint
* use c_str in errmsg directly
* fix
* fix
* make code clean
* fix integration test I missed
* fix to avoid naming collision in preprocessor
* address changes
* address changes
* address changes
* fix: fieldMask are actually shared with different context.
* address changes
* add converter function between two DocumentKey implementations
* add unit test
* address changes
* fix lint
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* naively remove FSTPath import and source/test files.
* port FieldPath, part I
* port FieldPath, part II
* port ResourcePath, part I
* port ResourcePath, part II
* the grand commit to fix build errors
* use testutil:: helper instead of those from FSTHelpers
* fix test and lint
* use c_str in errmsg directly
* fix
* fix
* make code clean
* fix integration test I missed
* fix to avoid naming collision in preprocessor
* address changes
* address changes
* address changes
* fix: fieldMask are actually shared with different context.
* address changes
* address changes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Track operation in progress FSTDispatchQueue
... and allow dispatchAsync onto the worker queue even from the same
queue if an operation is not in progress. Fixes #753.
This fixes a corner case that happens when users pass us an object and
we retain that object in a block submitted to the worker queue for
processing. Users are not obligated to retain that object themselves.
This can lead to the object's destructor (or dealloc or deinit) being
called on the Firestore worker thread. If that destructor makes
Firestore API calls (most likely ListenerRegistration.remove but any are
possible) this will trigger the assertion.
|
|
|
|
|
|
|
|
| |
Port of: https://github.com/firebase/firebase-js-sdk/pull/559
Should address #772 once released.
getNextMutationBatchAfterBatchId() was not respecting
highestAcknowledgedBatchId and therefore we were resending writes after the
network was disabled / re-enabled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Version bumps for Firebase 4.10.1 (#891)
* Minimal fix for b/74357976 (#890)
Fixes b/74357976 which caused unauthenticated users to be unable to reach the Firestore backend and updates the changelog.
* Copy all C++ strings to NSString where they're not obviously safe (#893)
This fixes a known instances of memory corruption where in
FSTLevelDBMutationQueue, the NSString view was retained for later, and
the incorrect user was used, causing b/74381054.
gRPC does not necessarily copy its string argumnets and if our hostname
were configured to a non-default one it's possible that we could corrupt
the host cache too.
All remaining usages of util::WrapNSStringNoCopy are obviously safe:
passed into logging or other known transient usages.
* fix lint
|
|\
| |
| | |
Merge Release 4.10.0 into Master
|
| |
| |
| |
| |
| |
| |
| |
| | |
* replace path with C++ implementation in FSTDocumentKey.{h,mm} only
* address changes
* address changes
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
offline. (#872)
[Port of https://github.com/firebase/firebase-js-sdk/commit/0fa319e5e019dd0d40ab441d2ff9f8f6d4724e43]
* Refactored FSTOnlineState tracking out of FSTRemoteStore and into new
FSTOnlineStateTracker component.
* Added a 10 second timeout to transition from OnlineState.Unknown to
OnlineState.Offline rather than waiting indefinitely for the stream to
succeed or fail.
* Removed hack to run SpecTests using an FSTDispatchQueue that wrapped
dispatch_get_main_queue(). This was incompatible with [FSTDispatchQueue
runDelayedCallbacksUntil:] since it queues work and blocks waiting for
it to complete. Now spec tests create / use a proper FSTDispatchQueue.
* Added a SpecTest to verify OnlineState timeout behavior.
* Misc cleanup:
* Renamed FSTOnlineState states: Failed => Offline, Healthy => Online
* Renamed FSTTimerIds (ListenStreamConnection => ListenStreamConnectionBackoff)
* Added ability to run timers from spec tests.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* add converters and fix FSTQuery.{h,m} only
* address changes
* a change forget to address
* add a dummy function to make inline-only-library buildable
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* lazy replacing FST(Firebase)CredentialsProvider by (Firebase)CredentialsProvider
* lazy replacing FSTUser by User
* adding error-code parameter to TokenListener
* actually use const user& instead of pointer; also add an error util
* add HashUser and pass into the unordered_map
* use User in test
* use c++ CredentialsProvider and subclass in test
* fix unit test
* use explicit capture in lambda instead of capture all by reference
* cache currentUser explicitly when reset sync engineer test driver
* objc object should be captured by value in lambda
* replacing Auth/FSTUser by C++ auth implementation
* address changes
* replacing FSTGetTokenResult by C++ Token implementation
* address changes
* fix unintentional change in merging
* patch the change in objc Auth up-stream
* somehow, the lambda-version of set-user-change-listener does not work... fallback to block
* address changes
* fix another const& v.s. dispatch bug
* fix more const& v.s. dispatch bug zxu123 committed
* fix a bad sync line
* address changes
* address change
* address change
* fix upstream change from merge
* fix upstream changes
* Suggested fixes for cpp/port_auth (#846)
* Get rid of MockDatastore factory
This avoids the need to statically allocate (and leak) a credentials
provider
* Use absl::make_unique
std::make_unique technically does not exist until C++14.
* #include <utility> for std::move
* Use std::future for the initial user
* fix style
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix bash style issues
* Exclude additional build output directories
* Format swift files with scripts/style.sh
* Reformat swift sources
* Allow swiftformat 0.32.0 on travis
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add Firestore_SwiftTests_iOS target to Xcode
* Add FirebaseFirestoreSwift podspec
* Add Firestore_SwiftTests_iOS to the Podfile
* Add CodableGeoPoint and tests
* Version FirebaseFirestoreSwift separately
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add FIRFirestoreTests to the Firestore Xcode project
* Avoid waitForExpectations:timeout:
This API was added in Xcode 8.3, but we still build production releases
with Xcode 8.2. waitForExpectationsWithTimeout:handler: is available
from Xcode 7.2.
* Add AppForUnitTesting
Add a utility for constructing a Firebase App for testing.
* Handle the nil UID from FIRAuth
* Avoid running CMake tests twice
* Only build app_testing on Apple platforms
* Revise test.sh messages
|
|
|
|
|
|
| |
* Avoid wrapping and rewrapping NSStrings when constructing DatabaseId
* Shorten DatabaseId::kDefaultDatabaseId
|
| |
|
|
|
|
| |
- FSTTimestamp is now FIRTimestamp, under Firestore/Source/{Public,API}. This is a temporary solution; eventually, FIRTimestamp is supposed to live somewhere under Firebase;
- move most internal Timestamp methods to the public header (the only exception is ISOString).
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix b/73167987: Upon receiving a permanent write error when we had additional
pendingWrites to send, we were restarting the stream with a new delegate and
then immediately setting the delegate to nil, causing the stream to ignore
all GRPC events for the stream.
* Fix b/73382103: We were attempting to gracefully teardown the write stream (i.e.
send an empty WriteRequest) even when the stream was already failed due
to an error. This caused no harm other than log pollution, but I fixed it.
* Use -[GRPCCall setResponseDispatchQueue] to dispatch GRPC callbacks directly onto the Firestore worker queue. This saves a double-dispatch and simplifies our logic.
* Add stricter assertions regarding stream state now that dispatch queue / callback filter race conditions are eliminated.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Basically a port of https://github.com/firebase/firebase-js-sdk/commit/a1e346ff93c6cbcc0a1b3b33f0fbc3a7b66e7e12 and https://github.com/firebase/firebase-js-sdk/commit/fce4168309f42aa038125f39818fbf654b65b05f
* Introduces a DelayedCallback helper class in FSTDispatchQueue to encapsulate delayed callback logic.
* Adds cancellation support.
* Updates the idle timer in FSTStream to use new cancellation support.
* Adds a FSTTimerId enum for identifying delayed operations on the queue and uses it to identify our existing backoff and idle timers.
* Added containsDelayedCallback: and runDelayedCallbacksUntil: methods to FSTDispatchQueue which can be used from tests to check for the presence of a callback or to schedule them to run early.
* Removes FSTTestDispatchQueue and changes idle tests to use new test methods.
|
|
|
|
|
|
| |
* replacing Auth/FSTUser by C++ auth implementation
* address changes
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Implement schema versions
* Style fixes
* newlines, copyrights, assumptions
* Fix nullability
* Raw ptr -> shared_ptr
* kVersionTableGlobal -> kVersionGlobalTable
* Drop utils, move into static methods
* Drop extra include
* Add a few more comments
* Move version constant into migrations file
* formatting?
* Fix comment
* Split add and update queryData
* Work on adding targetCount
* More work on count
* Using shared_ptr
* Implement count for query cache
* use quotes
* Add cast
* Styling
* Revert year bump in copyright
* Add adversarial key to migration test
* Add comment
* Fix style
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* implement SnapshotVersion and test
* update project
* implement MaybeDocument and test
* move snapshot-version from core to model
* fix a bug
* implement Document and test
* implement NoDocument
* adding type tag and fix style
* fix a few bugs, discovered after merging and test run.
* add assert to check FieldValue type and more test for comparision.
* address changes
* allow moving FieldValue to construct Document.
* address changes
* add document tests to project
* use std::less convention
* make Type::Unknown static initializer
|
| |
| |
| |
| |
| | |
Also move kDocumentKeyPath to the only point of usage - make it a static
member variable of FieldPath.
|
| |
| |
| | |
* implement SnapshotVersion and test
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Implement firestore/auth/user
* add user to project and some fixes
* implement firestore/auth/{credentials_provider,empty_credentials_provider}
* implement firestore/auth/firebase_credentials_provider
* refactoring firebase_credentials_provider and add (disabled but working) unit test
* add auth test to project
* address changes
* small fix to style and project
* fix the firebase_credentials_provider_test
* fix style
* address changes
* revert the change to static mutex_
* remove my custom plist path
* fix style
* address changes
* refactoring FirebaseCredentialsProvider to fix the issue w.r.t. auth global dispatch queue
* add /*force_refresh=*/ tag to bool literal for style purpose
* Use a shared_ptr/weak_ptr handoff on FirebaseCredentialsProvider (#778)
* Revert "refactoring FirebaseCredentialsProvider to fix the issue w.r.t. auth global dispatch queue"
This reverts commit 87175a4146267d403a774f138b85f8d3b532fa4b.
* Use a shared_ptr/weak_ptr handoff on FirebaseCredentialsProvider
This avoids any problems with callsbacks retaining pointers to objects
destroyed by a C++ destructor
|
|/ |
|
|
|
| |
Similar to Objective-C, FieldPath and ResourcePath share most of their interface (and implementation) by deriving from BasePath (using CRTP, so that factory methods in BasePath can return an instance of the derived class).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
iOS code (#738)
* implement Firestore DatabaseInfo in C++
* temporary stash changes; blocking on the massive renaming of .m to .mm
* add database_info_test to project
* finish port DatabaseId and fix style, modular fixing DatabaseInfo
* port DatabaseInfo
* remove FSTDatabase{ID,Info} and their tests from project
* fix unit test
* use namespace alias
* use namespace alias, leftover
* address more changes
* refactoring to use raw pointer instead of value for property
* address changes
* remove self->
* fix style
* remove the name suffix Alloc
* fix a bug
|
|
|
|
|
|
|
| |
I'm doing this to:
1) Experimentally see if it improves the flakiness we've been seeing in the Query Conformance Tests.
2) Insulate us from the fact that GRPC seems to take a /minimum/ of 10 seconds to reconnect (at least in some cases) after a connection failure.
I've opened b/72864027 to revisit this in the future.
|
| |
|
|
|
|
|
| |
This is dead code.
I think it was probably useful in the RTDB because of the way it notified of changes, but we give changes with indexes in Firestore so I think we don't need it.
|
|
|
|
|
|
| |
* Implement ArraySortedMap.remove
* Implement ArraySortedMap.insert
* Ensure ArraySortedMap.insert avoids copying on duplicates
* Port more ArraySortedMapTests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Move all Firestore files to Objective-C++
* Update project file references
* Don't use module imports from Objective-C++
* Use extern "C" for C-accessible globals
* Work around more stringent type checking in Objective-C++
* NSMutableDictionary ivars aren't implicitly casted to NSDictionary
* FSTMaybeDocument callback can't be passed a function that accepts
FSTDocument
* NSComparisonResult can't be multiplied by -1 without casting
* Add a #include <inttypes.h> where needed
* Avoid using C++ keywords as variables
* Remove #if __cplusplus guards
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement schema versions
* Style fixes
* newlines, copyrights, assumptions
* Fix nullability
* Raw ptr -> shared_ptr
* kVersionTableGlobal -> kVersionGlobalTable
* Drop utils, move into static methods
* Drop extra include
* Add a few more comments
* Move version constant into migrations file
* formatting?
* Fix comment
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement DataBaseId in C++
* add database_id_test to project
* fix project
* address changes
* fix style
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[PORT OF https://github.com/firebase/firebase-js-sdk/pull/470]
Context: I made a previous change to raise isFromCache=true events when the
client goes offline. As part of this change I added an assert for
"OnlineState should not affect limbo documents", which it turns out was not
valid because:
* When we go offline, we set the view to non-current and call
View.applyChanges().
* View.applyChanges() calls applyTargetChange() even though there's no target
change and it recalculates limbo documents.
* When the view is not current, we consider no documents to be in limbo.
* Therefore all limbo documents are removed and so applyChanges() ends up
returning unexpected LimboDocumentChanges.
Fix: I've modified the View logic so that we don't recalculate limbo documents
(and generate LimboDocumentChanges) when the View is not current, so now my
assert holds and there should be less spurious removal / re-adding of limbo
documents.
|
|
|
|
| |
* normalize bits
* normalize ordered_code
|
|
|
|
|
|
|
|
|
|
| |
* port TargetIdGenerator to iOS
* fix style
* move pointer property to instance variable
* TriggerTravis
|