Skip to content

Firestore: query.test.ts: use LRUGC in bloom filter tests #7401

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

Merged
merged 14 commits into from
Jul 4, 2023

Conversation

dconeybe
Copy link
Contributor

Previously, Firestore's bloom filter integration test exited early when testing without persistence; however, now that LRU garbage collection is supported for memory persistence, this test can run even with memory persistence as long as LRU GC is enabled (rather than the default, eager GC).

This PR updates the integration test framework to allow tests to specify a specific persistence configuration and the resuming a query should use bloom filter to avoid full requery test leverages this new functionality to use LRU GC when persistence=false, allowing the entire test to run to completion in both persistence modes.

@dconeybe dconeybe self-assigned this Jun 28, 2023
@dconeybe dconeybe requested review from a team as code owners June 28, 2023 18:13
@changeset-bot
Copy link

changeset-bot bot commented Jun 28, 2023

⚠️ No Changeset found

Latest commit: 962c538

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dconeybe dconeybe requested a review from milaGGL June 28, 2023 18:16
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 28, 2023

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 28, 2023

const localCache = persistence
? persistentLocalCache()
: memoryLocalCache({ garbageCollector: memoryLruGarbageCollector() });

Copy link
Contributor

Choose a reason for hiding this comment

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

While running locally against Prod, it is not using bloom filter:
Screenshot 2023-06-28 at 3 13 53 PM

@dconeybe dconeybe changed the base branch from master to dconeybe/PersistenceTestGeneralization June 30, 2023 18:19
Copy link
Contributor

@milaGGL milaGGL left a comment

Choose a reason for hiding this comment

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

LGTM.

Base automatically changed from dconeybe/PersistenceTestGeneralization to master July 4, 2023 14:32
@dconeybe dconeybe merged commit d41ee2f into master Jul 4, 2023
@dconeybe dconeybe deleted the dconeybe/BloomFilterTestRunsWithMemoryLruGc branch July 4, 2023 15:02
@firebase firebase locked and limited conversation to collaborators Aug 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants