Skip to content

Remove shared index entries #3138

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 2 commits into from
Nov 19, 2021
Merged

Conversation

schmidt-sebastian
Copy link
Contributor

This PR makes it so that all index entries are scoped to a user, which removes shared index entries for documents that are not mutated. For apps that use multiple users this means that we will keep more index entries, but in the general case it means that we keep one less (instead of keeping the unmodified value + the modified value for single user indices, we now just keep one).

This means that each index now has a different backfill state per user. If a new user signs in, we need to start backfill from zero. We likely need an additional data structure for that.

@schmidt-sebastian
Copy link
Contributor Author

cc @wu-hui

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Nov 16, 2021

Coverage Report

Affected SDKs

  • firebase-firestore

    SDK overall coverage changed from 44.99% (0e612ea) to 44.99% (9abb3bbc) by -0.01%.

    Filename Base (0e612ea) Head (9abb3bbc) Diff
    DeleteMutation.java 90.00% 95.00% +5.00%
    SQLiteIndexManager.java 95.72% 95.71% -0.01%
    SQLitePersistence.java 85.11% 84.57% -0.53%
    SetMutation.java 97.14% 94.29% -2.86%

Test Logs

Notes

HTML coverage reports can be produced locally with ./gradlew <product>:checkCoverage.
Report files are located at <product-build-dir>/reports/jacoco/.

Head commit (9abb3bbc) is created by Prow via merging commits: 0e612ea 16f7d40.

Copy link

@thebrianchen thebrianchen left a comment

Choose a reason for hiding this comment

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

lgtm for merging this into your other branch

@schmidt-sebastian schmidt-sebastian changed the base branch from mrschmidt/updateindices to master November 19, 2021 22:10
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Nov 19, 2021

Binary Size Report

Affected SDKs

  • firebase-firestore

    Type Base (0e612ea) Head (9abb3bbc) Diff
    aar 1.22 MB 1.22 MB -24 B (-0.0%)
    apk (release) 3.32 MB 3.32 MB -68 B (-0.0%)

Test Logs

Notes

Head commit (9abb3bbc) is created by Prow via merging commits: 0e612ea 16f7d40.

@schmidt-sebastian schmidt-sebastian merged commit 5bc0fef into master Nov 19, 2021
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/requireduser branch November 19, 2021 23:14
@firebase firebase locked and limited conversation to collaborators Dec 20, 2021
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