Skip to content

Fixed an issue where GC runs into a infinite loop in a certain case. #5585

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
Dec 5, 2023

Conversation

wu-hui
Copy link
Contributor

@wu-hui wu-hui commented Dec 1, 2023

Fixes: #5417

Copy link
Contributor

github-actions bot commented Dec 1, 2023

Release note changes

The following release notes were modified. Please ensure they look correct.

Release Notes
firebase-firestore
### {{firestore}} version 24.9.2 {: #firestore_v24-9-2}

* {{fixed}} Fixed an issue in the local cache synchronization logic where all locally-cached documents that matched a resumed query would be unnecessarily re-downloaded; with the fix it now only downloads the documents that are known to be out-of-sync. GitHub [#5506](//github.com/firebase/firebase-android-sdk/issues/5506){: .external}

* {{fixed}} Fixed an issue where GC runs into a infinite loop in a certain case. GitHub [#5417](//github.com/firebase/firebase-android-sdk/issues/5417){: .external}

#### {{firestore}} Kotlin extensions version 24.9.2 {: #firestore-ktx_v24-9-2}

The Kotlin extensions library transitively includes the updated
`firebase-firestore` library. The Kotlin extensions library has no additional
updates.

@wu-hui wu-hui changed the title Wuandy/fix infinite gc Fixed an issue where GC runs into a infinite loop in a certain case. Dec 1, 2023
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Dec 1, 2023

Coverage Report 1

Affected Products

  • firebase-firestore

    Overall coverage changed from 44.76% (879c84b) to 44.76% (e40f9e8) by +0.01%.

    FilenameBase (879c84b)Merge (e40f9e8)Diff
    SetMutation.java97.22%94.44%-2.78%
    SQLiteLruReferenceDelegate.java98.67%98.75%+0.08%

Test Logs

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

Copy link
Contributor

github-actions bot commented Dec 1, 2023

Unit Test Results

   180 files  +   118     180 suites  +118   4m 5s ⏱️ - 1m 47s
1 226 tests +   751  1 210 ✔️ +   735  16 💤 +16  0 ±0 
2 476 runs  +1 520  2 444 ✔️ +1 488  32 💤 +32  0 ±0 

Results for commit b2f46e6. ± Comparison against base commit 879c84b.

This pull request removes 475 and adds 1226 tests. Note that renamed tests count towards both.
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testBindsService_oAndTargetingO
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testNoWrappedIntent
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testNullIntent
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testStartsService_OTargetingO_highPriority
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testStartsService_fallsBackToBindService
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testStartsService_notOButTargetingO
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testStartsService_notOButTargetingO[19]
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testStartsService_notOButTargetingO[21]
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testStartsService_notOButTargetingO[22]
com.google.firebase.iid.FirebaseInstanceIdWithFcmReceiverRoboTest ‑ testStartsService_notOButTargetingO[23]
…
com.google.firebase.TimestampTest ‑ testCompare
com.google.firebase.TimestampTest ‑ testFromDate
com.google.firebase.TimestampTest ‑ testRejectBadDates
com.google.firebase.TimestampTest ‑ testTimestampParcelable
com.google.firebase.firestore.AggregateQuerySnapshotTest ‑ createWithCountShouldReturnInstanceWithTheGivenQueryAndCount
com.google.firebase.firestore.AggregateQueryTest ‑ testSourceMustNotBeNull
com.google.firebase.firestore.BlobTest ‑ testComparison
com.google.firebase.firestore.BlobTest ‑ testEquals
com.google.firebase.firestore.BlobTest ‑ testMutableBytes
com.google.firebase.firestore.CollectionReferenceTest ‑ testEquals
…

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Dec 1, 2023

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Dec 1, 2023

Startup Time Report 1

Note: Layout is sometimes suboptimal due to limited formatting support on GitHub. Please check this report on GCS.

Notes

Startup Times

  • fire-fst

    DeviceStatisticsDistributions
    oriole-32
    Percentile879c84be40f9e8DiffSignificant (?)
    p10426 ±215 μs466 ±229 μs+40.4 μs (+9.5%)NO
    p25444 ±217 μs482 ±233 μs+38.5 μs (+8.7%)NO
    p50473 ±213 μs507 ±234 μs+34.6 μs (+7.3%)NO
    p75559 ±196 μs560 ±223 μs+1.54 μs (+0.3%)NO
    p90673 ±160 μs623 ±209 μs-50.7 μs (-7.5%)NO

    20 test runs in comparison
    CommitTest Runs
    879c84b
    • 2023-11-22_21:58:51.311560_lKbF
    • 2023-11-22_21:58:51.311597_GcEs
    • 2023-11-22_21:58:51.311609_jHGy
    • 2023-11-22_21:58:51.311617_vVXn
    • 2023-11-22_21:58:51.311625_UxkR
    • 2023-11-22_21:58:51.311632_WMab
    • 2023-11-22_21:58:51.311645_plCh
    • 2023-11-22_21:58:51.311653_OVSt
    • 2023-11-22_21:58:51.311659_dZbD
    • 2023-11-22_21:58:51.311666_XsWX
    e40f9e8
    • 2023-12-05_18:46:58.331004_VrBz
    • 2023-12-05_18:46:58.331037_wVqp
    • 2023-12-05_18:46:58.331044_xqNP
    • 2023-12-05_18:46:58.331048_AduS
    • 2023-12-05_18:46:58.331053_yNtZ
    • 2023-12-05_18:46:58.331057_Fdtt
    • 2023-12-05_18:46:58.331067_klCZ
    • 2023-12-05_18:46:58.331075_xHvZ
    • 2023-12-05_18:46:58.331084_OhWm
    • 2023-12-05_18:46:58.331091_lHmG
    redfin-30
    Percentile879c84be40f9e8DiffSignificant (?)
    p10639 ±158 μs781 ±300 μs+143 μs (+22.4%)NO
    p25660 ±157 μs801 ±300 μs+141 μs (+21.4%)NO
    p50686 ±158 μs827 ±300 μs+141 μs (+20.6%)NO
    p75728 ±156 μs862 ±303 μs+134 μs (+18.4%)NO
    p90794 ±158 μs933 ±313 μs+139 μs (+17.5%)NO

    20 test runs in comparison
    CommitTest Runs
    879c84b
    • 2023-11-22_21:58:51.311560_lKbF
    • 2023-11-22_21:58:51.311597_GcEs
    • 2023-11-22_21:58:51.311609_jHGy
    • 2023-11-22_21:58:51.311617_vVXn
    • 2023-11-22_21:58:51.311625_UxkR
    • 2023-11-22_21:58:51.311632_WMab
    • 2023-11-22_21:58:51.311645_plCh
    • 2023-11-22_21:58:51.311653_OVSt
    • 2023-11-22_21:58:51.311659_dZbD
    • 2023-11-22_21:58:51.311666_XsWX
    e40f9e8
    • 2023-12-05_18:46:58.331004_VrBz
    • 2023-12-05_18:46:58.331037_wVqp
    • 2023-12-05_18:46:58.331044_xqNP
    • 2023-12-05_18:46:58.331048_AduS
    • 2023-12-05_18:46:58.331053_yNtZ
    • 2023-12-05_18:46:58.331057_Fdtt
    • 2023-12-05_18:46:58.331067_klCZ
    • 2023-12-05_18:46:58.331075_xHvZ
    • 2023-12-05_18:46:58.331084_OhWm
    • 2023-12-05_18:46:58.331091_lHmG
  • timeToInitialDisplay

    DeviceStatisticsDistributions
    oriole-32
    Percentile879c84be40f9e8DiffSignificant (?)
    p10201 ±4 ms205 ±2 ms+3.80 ms (+1.9%)NO
    p25208 ±4 ms212 ±2 ms+3.72 ms (+1.8%)NO
    p50215 ±5 ms220 ±4 ms+4.69 ms (+2.2%)NO
    p75223 ±4 ms229 ±4 ms+5.43 ms (+2.4%)NO
    p90232 ±6 ms239 ±6 ms+7.05 ms (+3.0%)NO

    20 test runs in comparison
    CommitTest Runs
    879c84b
    • 2023-11-22_21:58:51.311560_lKbF
    • 2023-11-22_21:58:51.311597_GcEs
    • 2023-11-22_21:58:51.311609_jHGy
    • 2023-11-22_21:58:51.311617_vVXn
    • 2023-11-22_21:58:51.311625_UxkR
    • 2023-11-22_21:58:51.311632_WMab
    • 2023-11-22_21:58:51.311645_plCh
    • 2023-11-22_21:58:51.311653_OVSt
    • 2023-11-22_21:58:51.311659_dZbD
    • 2023-11-22_21:58:51.311666_XsWX
    e40f9e8
    • 2023-12-05_18:46:58.331004_VrBz
    • 2023-12-05_18:46:58.331037_wVqp
    • 2023-12-05_18:46:58.331044_xqNP
    • 2023-12-05_18:46:58.331048_AduS
    • 2023-12-05_18:46:58.331053_yNtZ
    • 2023-12-05_18:46:58.331057_Fdtt
    • 2023-12-05_18:46:58.331067_klCZ
    • 2023-12-05_18:46:58.331075_xHvZ
    • 2023-12-05_18:46:58.331084_OhWm
    • 2023-12-05_18:46:58.331091_lHmG
    redfin-30
    Percentile879c84be40f9e8DiffSignificant (?)
    p10248 ±4 ms276 ±13 ms+27.8 ms (+11.2%)NO
    p25255 ±4 ms282 ±15 ms+27.3 ms (+10.7%)NO
    p50262 ±3 ms291 ±17 ms+28.9 ms (+11.1%)NO
    p75270 ±4 ms302 ±20 ms+31.9 ms (+11.8%)NO
    p90281 ±5 ms318 ±30 ms+37.5 ms (+13.4%)NO

    20 test runs in comparison
    CommitTest Runs
    879c84b
    • 2023-11-22_21:58:51.311560_lKbF
    • 2023-11-22_21:58:51.311597_GcEs
    • 2023-11-22_21:58:51.311609_jHGy
    • 2023-11-22_21:58:51.311617_vVXn
    • 2023-11-22_21:58:51.311625_UxkR
    • 2023-11-22_21:58:51.311632_WMab
    • 2023-11-22_21:58:51.311645_plCh
    • 2023-11-22_21:58:51.311653_OVSt
    • 2023-11-22_21:58:51.311659_dZbD
    • 2023-11-22_21:58:51.311666_XsWX
    e40f9e8
    • 2023-12-05_18:46:58.331004_VrBz
    • 2023-12-05_18:46:58.331037_wVqp
    • 2023-12-05_18:46:58.331044_xqNP
    • 2023-12-05_18:46:58.331048_AduS
    • 2023-12-05_18:46:58.331053_yNtZ
    • 2023-12-05_18:46:58.331057_Fdtt
    • 2023-12-05_18:46:58.331067_klCZ
    • 2023-12-05_18:46:58.331075_xHvZ
    • 2023-12-05_18:46:58.331084_OhWm
    • 2023-12-05_18:46:58.331091_lHmG

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

@wu-hui wu-hui requested a review from milaGGL December 1, 2023 18:09
@wu-hui wu-hui requested review from ehsannas and removed request for milaGGL December 4, 2023 16:26
@wu-hui wu-hui assigned ehsannas and unassigned milaGGL Dec 4, 2023
@ehsannas ehsannas assigned wu-hui and unassigned ehsannas Dec 5, 2023
@wu-hui wu-hui assigned ehsannas and unassigned wu-hui Dec 5, 2023
@wu-hui wu-hui merged commit 42a6951 into master Dec 5, 2023
@wu-hui wu-hui deleted the wuandy/FixInfiniteGc branch December 5, 2023 20:03
@firebase firebase locked and limited conversation to collaborators Jan 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Firestore Android get stuck permanently after a large volume of mutations
4 participants