Skip to content

Update test 'bloom filter should correctly encode special unicode characters' in query.test.ts #7413

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 4 commits into from
Jul 6, 2023

Conversation

dconeybe
Copy link
Contributor

@dconeybe dconeybe commented Jul 5, 2023

Modify the test 'bloom filter should correctly encode special unicode characters' in query.test.ts, that was added by the recent PR #7412, to directly check the bloom filter for containing the document paths with complex Unicode characters. Previously, it was indirectly checking this via the other properties of the existence filter. As a result, the "retry" logic was removed, since it doesn't matter if there is a false positive.

To add the ability to directly interrogate the bloom filter, the testing hooks needed to be augments to expose the "mightContain" method of BloomFilter.

This PR is ported to the Android SDK in firebase/firebase-android-sdk#5145 and to the iOS SDK in firebase/firebase-ios-sdk#11679.

…ment paths with complex Unicode characters, rather than indirectly testing it via the QuerySnapshot.
@dconeybe dconeybe self-assigned this Jul 5, 2023
@changeset-bot
Copy link

changeset-bot bot commented Jul 5, 2023

⚠️ No Changeset found

Latest commit: 159df22

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 5, 2023

Size Report 1

Affected Products

  • @firebase/firestore

    TypeBase (1ff891c)Merge (768bfc8)Diff
    browser370 kB370 kB+278 B (+0.1%)
    esm5356 kB356 kB+197 B (+0.1%)
    main568 kB569 kB+405 B (+0.1%)
    module370 kB370 kB+278 B (+0.1%)
    react-native370 kB370 kB+278 B (+0.1%)
  • bundle

    TypeBase (1ff891c)Merge (768bfc8)Diff
    firestore (Persistence)301 kB301 kB+182 B (+0.1%)
    firestore (Query Cursors)238 kB239 kB+182 B (+0.1%)
    firestore (Query)236 kB236 kB+182 B (+0.1%)
    firestore (Read data once)223 kB224 kB+182 B (+0.1%)
    firestore (Realtime updates)226 kB226 kB+182 B (+0.1%)
  • firebase

    TypeBase (1ff891c)Merge (768bfc8)Diff
    firebase-compat.js773 kB774 kB+176 B (+0.0%)
    firebase-firestore-compat.js339 kB340 kB+176 B (+0.1%)
    firebase-firestore.js430 kB430 kB+280 B (+0.1%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/BMm40CJkHA.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 5, 2023

Size Analysis Report 1

Affected Products

  • @firebase/firestore

    • enableMultiTabIndexedDbPersistence

      Size

      TypeBase (1ff891c)Merge (768bfc8)Diff
      size220 kB220 kB+182 B (+0.1%)
      size-with-ext-deps292 kB292 kB+182 B (+0.1%)
    • getDoc

      Size

      TypeBase (1ff891c)Merge (768bfc8)Diff
      size143 kB143 kB+182 B (+0.1%)
      size-with-ext-deps213 kB213 kB+182 B (+0.1%)
    • getDocFromServer

      Size

      TypeBase (1ff891c)Merge (768bfc8)Diff
      size143 kB143 kB+182 B (+0.1%)
      size-with-ext-deps213 kB213 kB+182 B (+0.1%)
    • getDocs

      Size

      TypeBase (1ff891c)Merge (768bfc8)Diff
      size144 kB145 kB+182 B (+0.1%)
      size-with-ext-deps215 kB215 kB+182 B (+0.1%)
    • getDocsFromServer

      Size

      TypeBase (1ff891c)Merge (768bfc8)Diff
      size144 kB144 kB+182 B (+0.1%)
      size-with-ext-deps215 kB215 kB+182 B (+0.1%)
    • onSnapshot

      Size

      TypeBase (1ff891c)Merge (768bfc8)Diff
      size145 kB145 kB+182 B (+0.1%)
      size-with-ext-deps215 kB215 kB+182 B (+0.1%)
    • onSnapshotsInSync

      Size

      TypeBase (1ff891c)Merge (768bfc8)Diff
      size135 kB135 kB+182 B (+0.1%)
      size-with-ext-deps205 kB205 kB+182 B (+0.1%)
    • persistentMultipleTabManager

      Size

      TypeBase (1ff891c)Merge (768bfc8)Diff
      size217 kB217 kB+182 B (+0.1%)
      size-with-ext-deps289 kB289 kB+182 B (+0.1%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/JV16FeVMp8.html

@dconeybe dconeybe marked this pull request as ready for review July 5, 2023 16:41
@dconeybe dconeybe requested review from a team as code owners July 5, 2023 16:41
@dconeybe dconeybe requested a review from milaGGL July 5, 2023 16:41
@dconeybe dconeybe requested a review from milaGGL July 5, 2023 19:47
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

@dconeybe dconeybe merged commit c29156a into master Jul 6, 2023
@dconeybe dconeybe deleted the dconeybe/BloomFilterUnicodeTestSimplification branch July 6, 2023 01:50
@firebase firebase locked and limited conversation to collaborators Aug 6, 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