| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
| |
one go (#1505)
This uses the newly-added allMutationBatchesAffectingDocumentKeys to find/deserialize all such batches in one go and then reuse the batches while processing a set of keys.
|
|
|
|
|
| |
* Pod updates for Cocapods 1.5.3
* Add allMutationsAffectingDocumentKeys
|
|
|
|
|
|
| |
* Add leveldb_transaction* to the CMake build
* Use std::unique_ptr for leveldb::DB pointers
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* Migrate FSTFail to HARD_FAIL
* FSTCFail -> HARD_FAIL
* FSTCAssert -> HARD_ASSERT
* FSTAssert -> HARD_ASSERT
* Replace FSTAssert with NSAssert in dead Objective-C code
* Remove FSTAssert.h
|
|
|
|
|
|
|
| |
* Add direct support for formatting Objective-C objects
* Rewrite log.h
* Convert FSTWarn to LOG_WARN
* Convert FSTLog to LOG_DEBUG
* Remove FSTLogger
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Bump sequence number on resume token refresh
* Style
* Fix comment formatting
* Add FSTReferenceDelegate definition and documentation
* Add methods to return nil for delegates, wire up inMemoryPins
* Add hook for removing a reference
* Start work on reference delegates
* Fix up tests to support adding documents at a sequence number
* Implement removing references
* Remove from target when dropped from local view
* Fix warning
* Add hooks for removal from mutation queue
* Add hooks for limbo document updates
* Style
* Drop commented-out code
* Fixup after merging master
* Drop sequence number plumbing
* Style
* Drop errant semicolon
|
| |
|
|
|
|
|
|
|
|
|
| |
* Define a Comparator for DocumentKey
* Automated migration from FSTDocumentKeySet to DocumentKeySet
* Manual fixups for DocumentKeySet
* Delete FSTDocumentKeySet
|
|
|
|
|
|
|
|
| |
* Bump sequence number on resume token refresh
* Style
* Fix comment formatting
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* remove conversions in `Local` and `Remote`
* replace `FSTSnapshotVersion` in `Model`
* replace `FSTSnapshotVersion` in the rest
* let test check equal with C++ equal
* fix newly added code
* address changes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* no-brainer replace FSTSnapshotVersion by SnapshotVersion in `Remote`
* delete `FSTSnapshotVersion` in `Remote`
* fix test
* partially revert RemoteEvent
* Revert "partially revert RemoteEvent"
This reverts commit 67e35bb6c11eaf79608df8d02a60788a40331d0f.
* fix a bug
* fix integration
* address changes
|
|
|
|
|
|
|
|
|
|
|
|
| |
* no-brainer replace `FSTSnapshotVersion` with `SnapshotVersion`
* refresh code
* fix LocalStore
* fix LocalStore (partial revert 78e6c38)
* address changes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lint.sh now lints Objective-C++ too
* cpplint checks system-style includes that should be user-style
This prevents it from recognizing project sources as if they were C
system headers and then complaining that they're in the wrong place.
* cpplint checks #imports and #includes
* cpplint checks that C++ system headers aren't #imported
* cpplint checks for C system headers that could be C++ system headers
* cpplint checks that Objective-C sources include their headers
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Drop write group from remote document change buffer
* Unwind some group dependendencies in local store
* Write group dropped from local store
* Drop write group from mutation queue tests
* Drop write group usage from query cache tests
* Drop write groups from remote document cache tests
* Drop write groups from remote document change buffer tests
* Drop write groups and the write group tracker
* Style
* Put the action in transaction
* Merge master, fix test
* Fix some compiler warnings but mostly trigger travis
* Responses to feedback
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Drop mutation queue shutdown
* Drop query cache shutdown
* Drop remote document cache shutdown
* Drop local store shutdown
* drop newline
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* FSTMutationQueue no longer needs groups
* Remove write group from mutation queue entirely
* Remove write group from query cache
* Mark groups unused in remote document cache
* Drop write group entirely from remote document cache
* style
* Drop commented-out code
* Drop commented-out code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
* Start switching writegroup over
* Swap out write group tracking for transaction usage
* Style
* Response to feedback before updating docs
* Style
* Add comment
* Initialize version_
* Satisfy the linter
* Start switching writegroup over
* Swap out write group tracking for transaction usage
* Style
* Checkpoint before implementing BatchDescription
* Style
* Initial plumbing for leveldb local parts
* Add model::BatchId
* Port leveldb_key.{h,cc}
* Add string StartsWith
* Add leveldb_key_test.cc to the project
* Revert back to using leveldb::Slice for read/describe
These operations universally operate on keys obtained from leveldb so
it's actually unhelpful to force all the callers to make
absl::string_views from them.
* Everything passing
* Drop unused function
* Style
* STart work on reads
* Swap reads in queryCache to use transactions
* Fix up tests of querycache
* Drop commented out code
* Cleanup
* Style
* Fix up for passing tests
* style
* Renaming
* Style
* Start work on ToString for transactions
* Add ToString() method to LevelDbTransaction
* Style
* lint
* Fix includes, drop runTransaction
* current_transaction -> currentTransaction
* LevelDbTransaction::NewIterator now returns a unique_ptr
* Style
* Revert addition of util::StartsWith
* Add log line
* Style
* Add log line
* Style
* Add debug log line for commits, drop unused BatchDescription
* STart work on reads
* Swap reads in queryCache to use transactions
* Start on remote documents
* Transition mutation queue and remote documents to use transactions
* Style
* Make everything pass
* Make everything pass
* Make it compile
* Style
* Style
* Revert name change, use DefaultReadOptions()
* Style
* Example of running a transaction with a lambda
* Drop errant typo
* Drop duplicate method declarations
* replace usage of auto w/ decltype
* Drop an unnecessary _Nullable. Add some nullability warning suppression
* use absl::make_unique, handle void return type
* Style
* Wrap backing persistence and expectation of backing persistence for transaction runner into a method
* More comments, trigger CI
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
* Start switching writegroup over
* Swap out write group tracking for transaction usage
* Style
* Response to feedback before updating docs
* Style
* Add comment
* Initialize version_
* Satisfy the linter
* Start switching writegroup over
* Swap out write group tracking for transaction usage
* Style
* Checkpoint before implementing BatchDescription
* Style
* Initial plumbing for leveldb local parts
* Add model::BatchId
* Port leveldb_key.{h,cc}
* Add string StartsWith
* Add leveldb_key_test.cc to the project
* Revert back to using leveldb::Slice for read/describe
These operations universally operate on keys obtained from leveldb so
it's actually unhelpful to force all the callers to make
absl::string_views from them.
* Everything passing
* Drop unused function
* Style
* STart work on reads
* Swap reads in queryCache to use transactions
* Fix up tests of querycache
* Drop commented out code
* Cleanup
* Style
* Fix up for passing tests
* style
* Renaming
* Style
* Start work on ToString for transactions
* Add ToString() method to LevelDbTransaction
* Style
* lint
* Fix includes, drop runTransaction
* current_transaction -> currentTransaction
* LevelDbTransaction::NewIterator now returns a unique_ptr
* Style
* Revert addition of util::StartsWith
* Add log line
* Style
* Add log line
* Style
* Add debug log line for commits, drop unused BatchDescription
* STart work on reads
* Swap reads in queryCache to use transactions
* Start on remote documents
* Transition mutation queue and remote documents to use transactions
* Style
* Make everything pass
* Make everything pass
* Make it compile
* Style
* Style
* Revert name change, use DefaultReadOptions()
* Style
* Handle iterators returning bad statuses
|
|
|
|
|
|
|
|
|
|
|
|
| |
* port C++ DocumentKey to Remote's
* port C++ DocumentKey to Remote's
* address changes
* address changes
* address changes
|
|
|
|
|
|
| |
* port C++ DocumentKey to Local's
* 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
* Start switching writegroup over
* Swap out write group tracking for transaction usage
* Style
* Response to feedback before updating docs
* Style
* Add comment
* Initialize version_
* Satisfy the linter
* Start switching writegroup over
* Swap out write group tracking for transaction usage
* Style
* Checkpoint before implementing BatchDescription
* Style
* Initial plumbing for leveldb local parts
* Add model::BatchId
* Port leveldb_key.{h,cc}
* Add string StartsWith
* Add leveldb_key_test.cc to the project
* Revert back to using leveldb::Slice for read/describe
These operations universally operate on keys obtained from leveldb so
it's actually unhelpful to force all the callers to make
absl::string_views from them.
* Everything passing
* Drop unused function
* Style
* STart work on reads
* Swap reads in queryCache to use transactions
* Fix up tests of querycache
* Drop commented out code
* Cleanup
* Style
* Fix up for passing tests
* style
* Renaming
* Style
* Start work on ToString for transactions
* Add ToString() method to LevelDbTransaction
* Style
* lint
* Fix includes, drop runTransaction
* current_transaction -> currentTransaction
* LevelDbTransaction::NewIterator now returns a unique_ptr
* Style
* Revert addition of util::StartsWith
* Add log line
* Style
* Add log line
* Style
* Add debug log line for commits, drop unused BatchDescription
* Fix an include, but mostly try to trigger a travis build
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
* Start switching writegroup over
* Swap out write group tracking for transaction usage
* Style
* Response to feedback before updating docs
* Style
* Add comment
* Initialize version_
* Satisfy the linter
* Start switching writegroup over
* Swap out write group tracking for transaction usage
* Style
* Checkpoint before implementing BatchDescription
* Style
* Everything passing
* Drop unused function
* Style
* Renaming
* Style
* Add log line
* Style
* Add debug log line for commits, drop unused BatchDescription
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
* replace path with C++ implementation in FSTDocumentKey.{h,mm} only
* address changes
* address changes
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
| |
- 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).
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
| |
* normalize bits
* normalize ordered_code
|
|
|
|
|
|
|
|
|
|
| |
* port TargetIdGenerator to iOS
* fix style
* move pointer property to instance variable
* TriggerTravis
|
|
|
|
| |
* refactoring string_util
* port string_util to iOS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reimplements our comparison functions as C++ Comparators and then provides compatibility shims for interoperating with existing Objective-C usage.
A few specialized comparators aren't suitable for porting but only have a single usage (e.g. CompareBytes for comparing NSData * instances). In these cases I've moved them into the caller.
* Use int32_t for typeof(ID) in FSTDocumentReference
* Migrate callers of FSTComparison.h to Objective-C++
* Port comparison to C++
* Migrate usages of FSTComparison.h to C++ equivalents
* Remove FSTComparison
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Generate and save sequence numbers for listens
* Add documentation
* Fix include path
* Fix unavailable comment
* Review feedback
|
|
|
|
|
| |
* Fix FSTLocalDocumentsView to allow multiple mutations while offline.
Previously, only the last mutation would actually be visible.
|
|
|
|
| |
Run style.sh (w/ clang-format version 6)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add bone code for new isEqual and unit test for old isEqual
* add bone code for `FIRCollectionReference`, `FIRDocumentSnapshot`, `FIRFieldValue`, `FIRQuerySnapshot`, `FIRSnapshotMetadata`;
* change inconsistenciness of `FIRFieldPath.isEqual` implementation;
* add unit test (and file) for `FIRDocumentReferenceTest.m`, `FIRFieldPathTest.m`, `FIRQueryTests.testEquals`; `FIRGeoPoint` already has test and Blob is internal type.
* Implement isEqual for FIRCollectionReference
adding the working code and unit test.
* implement isEqual for FIRSnapshotMetadata
* Implement isEqual for FIRDocumentSnapshot
* Implement isEqual for FIRQuerySnapshot
* (un)implement `isEqual` for `FIRFieldValue`
Since `FIRFieldValue` both types are singleton, we do not need override `isEqual`. Add test to test the default `NSObject` `isEqual` works just fine.
* fix style with `scripts/style.sh`
* Implement hash for those with overridden isEqual without hash yet.
* refactor to use test helper functions -- FSTTestFirestore, FSTTestPath, FSTTestDocKey
* refactor using test helper `FSTTestDocSnapshot`, `FSTTestFieldPath`, `FSTTestQuery`, `FSTTestDoc`
* refactoring to use test helper method `FSTTestQuerySnapshot`,
* remove unneccessary nil-check, check isKindOfClass instead of isEqual
* refactoring: adding `FSTAPIHelpers.{h,m}`, `FSTTest{Collection,Document}Ref`, better naming and style fix
* a file forgot in last commit
* mainly clean up import and some minor refactoring
* fix style via style.sh
* minor style fix
* add pragma ignored -Wnonnull
|
|
|
|
|
|
|
|
|
| |
NSStrings are utf16, so NSString::length returns the number of utf16
characters present in the string. When the string is entirely made up of
US-ASCII characters, everything's fine. But when characters requiring 16
bits are present, the size calculations were incorrect.
Fixed by calculating the length based on the destination character set
(i.e. UTF8).
|
|
|
|
| |
Minor optimization (which is already present in the ts code).
|