Skip to content

Apply range-filters in get when probing active-listener cache #4408

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 20 commits into from
Feb 10, 2021

Conversation

jmwski
Copy link
Contributor

@jmwski jmwski commented Feb 3, 2021

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2021

🦋 Changeset detected

Latest commit: 4e8e453

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@firebase/database Patch
firebase Patch
@firebase/rules-unit-testing Patch

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Feb 3, 2021

Binary Size Report

Affected SDKs

  • @firebase/database

    Type Base (40a702e) Head (daca20a) Diff
    browser 276 kB 277 kB +1.18 kB (+0.4%)
    esm2017 243 kB 244 kB +1.44 kB (+0.6%)
    main 279 kB 280 kB +1.18 kB (+0.4%)
    module 276 kB 277 kB +1.18 kB (+0.4%)
  • @firebase/database-exp

    Type Base (40a702e) Head (daca20a) Diff
    browser 277 kB 278 kB +1.18 kB (+0.4%)
    esm2017 241 kB 242 kB +1.44 kB (+0.6%)
    main 279 kB 280 kB +1.18 kB (+0.4%)
    module 277 kB 278 kB +1.18 kB (+0.4%)
  • firebase

    Type Base (40a702e) Head (daca20a) Diff
    firebase-database.js 195 kB 194 kB -644 B (-0.3%)
    firebase.js 856 kB 855 kB -644 B (-0.1%)

Test Logs

query.path
);
let view: View = syncPoint.getView(query, writesCache, serverCache, true);
return view.getCompleteServerCache(query.path);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@schmidt-sebastian This seems to apply the filters for startAfter/endBefore, but it erroneously returns null for this test: https://github.com/firebase/firebase-js-sdk/blob/master/packages/database/test/query.test.ts#L3159-L3179.

Can you have a look at this? I'm trying to figure out why this is happening but not making much progress.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Feb 3, 2021

Size Analysis Report

Affected Products

No changes between base commit (40a702e) and head commit (daca20a).

const childOne = node.push();
const childTwo = node.push();
await childOne.set(1);
await childTwo.set(2);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do the tests still pass if you don't await here? I would like to confirm that we correctly apply local writes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They do still pass.

@jmwski jmwski assigned schmidt-sebastian and unassigned jmwski Feb 8, 2021
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian left a comment

Choose a reason for hiding this comment

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

getServerValue(query: Query): Node | null {
const path = query.path;
let serverCache: Node | null = null;
let foundAncestorDefaultView = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

foundAncestorDefaultView is not used and can be removed.

@jmwski jmwski removed their assignment Feb 9, 2021
@jmwski
Copy link
Contributor Author

jmwski commented Feb 9, 2021

@Feiyang1 for code-owner review.

@jmwski jmwski assigned schmidt-sebastian and unassigned Feiyang1 Feb 9, 2021
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian left a comment

Choose a reason for hiding this comment

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

Additional tests LGTM. Thanks for all the extra effort!

@jmwski jmwski merged commit 318af54 into master Feb 10, 2021
@jmwski jmwski deleted the jw/fix-get-again branch February 10, 2021 02:15
@google-oss-bot google-oss-bot mentioned this pull request Feb 10, 2021
@firebase firebase locked and limited conversation to collaborators Mar 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants