Conversation
🦋 Changeset detectedLatest commit: 85483bf The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1This report is too large (729,651 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.Test Logs |
egilmorez
left a comment
There was a problem hiding this comment.
A few tweaks to the public doc comments, thanks!
MarkDuckworth
left a comment
There was a problem hiding this comment.
LGTM with comments
| * | ||
| * This collector tries to ensure lowest memory footprints from the SDK, | ||
| * at the risk of querying backend repeated for a document it could have | ||
| * cached locally. |
There was a problem hiding this comment.
I think this statement is misleading as it gives indication that having documents in the cache will retrieve documents stored in the cached and go to the backend when not in cache.
Consider instead "This collector tries to ensure lowest memory footprints from the SDK, at the risk of documents not being cached for offline queries or for direct queries to the cache."
|
|
||
| createPersistence(cfg: ComponentConfiguration): Persistence { | ||
| const lruParams = | ||
| this.cacheSizeBytes !== undefined |
There was a problem hiding this comment.
wondering if we need a range check for this.cacheSizeBytes > 0
There was a problem hiding this comment.
This actually won't work because we use -1 to disable GC.
I really do not like this approach, we should do something similar to the new cache config API, using a dedicated enum branch to disable GC. Maybe something for the fixit week.
| * (incoming GRPC messages), we should always schedule onto this queue. // | ||
| * This ensures all of our work is properly serialized (e.g. we don't // | ||
| * start processing a new operation while the previous one is waiting for // | ||
| * an async I/O to complete). // |
There was a problem hiding this comment.
Not sure if ending // were intentional
There was a problem hiding this comment.
Ah, I hate it when my editor does this and i don't know how to stop it.
| persistence: MemoryPersistence, | ||
| lruParams: LruParams | null | ||
| ): MemoryLruDelegate { | ||
| return new MemoryLruDelegate(persistence, lruParams!!); |
There was a problem hiding this comment.
what is the double exclamation at the end of lruParams!! do? I'm not familiar with the double.
There was a problem hiding this comment.
It tells complier that you are sure this is a LruParams, not a null. I removed | null in this case, it was not neccessary.
| ensureManualLruGC(): this { | ||
| debugAssert( | ||
| !this.currentStep, | ||
| 'withGCEnabled() must be called before all spec steps.' |
There was a problem hiding this comment.
Update name in error message
| .triggerLruGC(1) | ||
| .removeExpectedTargetMapping(query1) | ||
| // should get no events. | ||
| .userListens(query1) |
There was a problem hiding this comment.
Is the test name and the test implementation aligned on this one? Maybe I'm not following what it's trying to assert
| * | ||
| * This collector tries to ensure lowest memory footprints from the SDK, | ||
| * at the risk of querying backend repeated for a document it could have | ||
| * cached locally. |
|
|
||
| createPersistence(cfg: ComponentConfiguration): Persistence { | ||
| const lruParams = | ||
| this.cacheSizeBytes !== undefined |
There was a problem hiding this comment.
This actually won't work because we use -1 to disable GC.
I really do not like this approach, we should do something similar to the new cache config API, using a dedicated enum branch to disable GC. Maybe something for the fixit week.
| * (incoming GRPC messages), we should always schedule onto this queue. // | ||
| * This ensures all of our work is properly serialized (e.g. we don't // | ||
| * start processing a new operation while the previous one is waiting for // | ||
| * an async I/O to complete). // |
There was a problem hiding this comment.
Ah, I hate it when my editor does this and i don't know how to stop it.
| persistence: MemoryPersistence, | ||
| lruParams: LruParams | null | ||
| ): MemoryLruDelegate { | ||
| return new MemoryLruDelegate(persistence, lruParams!!); |
There was a problem hiding this comment.
It tells complier that you are sure this is a LruParams, not a null. I removed | null in this case, it was not neccessary.
| .triggerLruGC(1) | ||
| .removeExpectedTargetMapping(query1) | ||
| // should get no events. | ||
| .userListens(query1) |
|
Please take a look, I need owner's approval for something outside of firestore. I do not understand why they show up though, they seem to be generated automatically. Check some changes under: common/ They are all auth-related. |
hsubox76
left a comment
There was a problem hiding this comment.
- Sorry about auth.api.md. I made a PR to ensure it's reverted after docgen is run but this branch may have been created before that: #7014 You can just revert it.
- Can you add a changeset? It should be
@firebase/firestoreminor andfirebaseminor (theyarn changesetCLI should help you add the first automatically, the second has to be added manually)
Done, thanks! |
| @@ -0,0 +1,6 @@ | |||
| --- | |||
| 'firebase': patch | |||
There was a problem hiding this comment.
These should be minor as it's changing the API.
| ): MultiClientSpecBuilder { | ||
| const specBuilder = new MultiClientSpecBuilder(); | ||
| specBuilder.withGCEnabled(withGcEnabled === true); | ||
| specBuilder.ensureManualLruGC(); |
There was a problem hiding this comment.
Shouldn't this be:
if (withGcEnabled !== true) {
specBuilder.ensureManualLruGC();
}There was a problem hiding this comment.
Oh yeah, thanks for checking this.
I intended to delete withGcEnabled all together, because multitab will always have lru gc. I just forgot to delete it.
Googlers see: go/firestore-memory-lru