Skip to content

Handle corruption in DataStore Preferences gracefully#5633

Merged
mrober merged 2 commits intomasterfrom
sessions-datastorecur
Jan 9, 2024
Merged

Handle corruption in DataStore Preferences gracefully#5633
mrober merged 2 commits intomasterfrom
sessions-datastorecur

Conversation

@mrober
Copy link
Copy Markdown
Contributor

@mrober mrober commented Jan 9, 2024

Handle corruption in DataStore Preferences more gracefully.

Tested manually by piping junk data into the datastore files.

When the Settings data store preferences gets corrupt, it will be replaced by an empty preferences with all null values. This will cause settings to fall through to sdk defaults until the next settings fetch. If the Sessions data store preferences gets corrupt, it will lose the session id until the next session is generated on the next foreground. I could not force a session to upload will a null session id, but I expect it to be rare but possible with a multi-process app.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 9, 2024

📝 PRs merging into main branch

Our main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released.

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 9, 2024

📝 PRs merging into main branch

Our main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released.

@google-oss-bot
Copy link
Copy Markdown
Collaborator

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 9, 2024

Unit Test Results

   142 files  +   136     142 suites  +136   3m 10s ⏱️ + 2m 52s
1 074 tests +1 055  1 074 ✔️ +1 055  0 💤 ±0  0 ±0 
2 148 runs  +2 110  2 148 ✔️ +2 110  0 💤 ±0  0 ±0 

Results for commit 0e2e342. ± Comparison against base commit eb3380e.

@google-oss-bot
Copy link
Copy Markdown
Collaborator

@google-oss-bot
Copy link
Copy Markdown
Collaborator

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-cls

    DeviceStatisticsDistributions
    oriole-32
    Percentileeb3380e8c51947DiffSignificant (?)
    p1011.1 ±3 ms11.0 ±3 ms-177 μs (-1.6%)NO
    p2511.9 ±4 ms11.7 ±3 ms-217 μs (-1.8%)NO
    p5013.0 ±4 ms12.9 ±3 ms-176 μs (-1.4%)NO
    p7514.4 ±4 ms14.2 ±3 ms-116 μs (-0.8%)NO
    p9015.7 ±4 ms16.1 ±4 ms+333 μs (+2.1%)NO

    20 test runs in comparison
    CommitTest Runs
    eb3380e
    • 2024-01-05_18:47:45.102608_YtdO
    • 2024-01-05_18:47:45.102643_pltD
    • 2024-01-05_18:47:45.102649_MJkq
    • 2024-01-05_18:47:45.102654_uwlG
    • 2024-01-05_18:47:45.102659_wXcK
    • 2024-01-05_18:47:45.102667_VlHh
    • 2024-01-05_18:47:45.102676_tapf
    • 2024-01-05_18:47:45.102692_bTDF
    • 2024-01-05_18:47:45.102701_McSA
    • 2024-01-05_18:47:45.102708_FFqO
    8c51947
    • 2024-01-09_17:00:36.109598_ikBd
    • 2024-01-09_17:00:36.109632_ROvs
    • 2024-01-09_17:00:36.109644_dvAz
    • 2024-01-09_17:00:36.109654_wTuh
    • 2024-01-09_17:00:36.109663_iDqV
    • 2024-01-09_17:00:36.109669_NdXs
    • 2024-01-09_17:00:36.109673_rrIy
    • 2024-01-09_17:00:36.109682_tkhH
    • 2024-01-09_17:00:36.109686_qkfy
    • 2024-01-09_17:00:36.109690_xAWS
    redfin-30
    Percentileeb3380e8c51947DiffSignificant (?)
    p1014.1 ±7 ms13.7 ±5 ms-458 μs (-3.2%)NO
    p2514.7 ±7 ms14.5 ±5 ms-225 μs (-1.5%)NO
    p5015.7 ±8 ms15.7 ±6 ms-1.32 μs (-0.0%)NO
    p7517.1 ±9 ms17.5 ±8 ms+423 μs (+2.5%)NO
    p9018.8 ±9.7 ms19.7 ±9 ms+835 μs (+4.4%)NO

    20 test runs in comparison
    CommitTest Runs
    eb3380e
    • 2024-01-05_18:47:45.102608_YtdO
    • 2024-01-05_18:47:45.102643_pltD
    • 2024-01-05_18:47:45.102649_MJkq
    • 2024-01-05_18:47:45.102654_uwlG
    • 2024-01-05_18:47:45.102659_wXcK
    • 2024-01-05_18:47:45.102667_VlHh
    • 2024-01-05_18:47:45.102676_tapf
    • 2024-01-05_18:47:45.102692_bTDF
    • 2024-01-05_18:47:45.102701_McSA
    • 2024-01-05_18:47:45.102708_FFqO
    8c51947
    • 2024-01-09_17:00:36.109598_ikBd
    • 2024-01-09_17:00:36.109632_ROvs
    • 2024-01-09_17:00:36.109644_dvAz
    • 2024-01-09_17:00:36.109654_wTuh
    • 2024-01-09_17:00:36.109663_iDqV
    • 2024-01-09_17:00:36.109669_NdXs
    • 2024-01-09_17:00:36.109673_rrIy
    • 2024-01-09_17:00:36.109682_tkhH
    • 2024-01-09_17:00:36.109686_qkfy
    • 2024-01-09_17:00:36.109690_xAWS
  • fire-perf

    DeviceStatisticsDistributions
    oriole-32
    Percentileeb3380e8c51947DiffSignificant (?)
    p10316 ±166 μs247 ±21 μs-69.4 μs (-22.0%)NO
    p25330 ±168 μs257 ±19 μs-73.1 μs (-22.1%)NO
    p50355 ±171 μs278 ±15 μs-76.8 μs (-21.6%)NO
    p75398 ±166 μs327 ±26 μs-71.5 μs (-17.9%)NO
    p90455 ±161 μs386 ±36 μs-69.0 μs (-15.2%)NO

    20 test runs in comparison
    CommitTest Runs
    eb3380e
    • 2024-01-05_18:47:45.102608_YtdO
    • 2024-01-05_18:47:45.102643_pltD
    • 2024-01-05_18:47:45.102649_MJkq
    • 2024-01-05_18:47:45.102654_uwlG
    • 2024-01-05_18:47:45.102659_wXcK
    • 2024-01-05_18:47:45.102667_VlHh
    • 2024-01-05_18:47:45.102676_tapf
    • 2024-01-05_18:47:45.102692_bTDF
    • 2024-01-05_18:47:45.102701_McSA
    • 2024-01-05_18:47:45.102708_FFqO
    8c51947
    • 2024-01-09_17:00:36.109598_ikBd
    • 2024-01-09_17:00:36.109632_ROvs
    • 2024-01-09_17:00:36.109644_dvAz
    • 2024-01-09_17:00:36.109654_wTuh
    • 2024-01-09_17:00:36.109663_iDqV
    • 2024-01-09_17:00:36.109669_NdXs
    • 2024-01-09_17:00:36.109673_rrIy
    • 2024-01-09_17:00:36.109682_tkhH
    • 2024-01-09_17:00:36.109686_qkfy
    • 2024-01-09_17:00:36.109690_xAWS
    redfin-30
    Percentileeb3380e8c51947DiffSignificant (?)
    p10756 ±143 μs899 ±284 μs+144 μs (+19.0%)NO
    p25797 ±136 μs967 ±264 μs+170 μs (+21.4%)NO
    p50855 ±141 μs1.04 ±0.3 ms+190 μs (+22.2%)NO
    p751.02 ±0.3 ms1.12 ±0.3 ms+105 μs (+10.3%)NO
    p901.18 ±0.4 ms1.26 ±0.2 ms+77.2 μs (+6.5%)NO

    20 test runs in comparison
    CommitTest Runs
    eb3380e
    • 2024-01-05_18:47:45.102608_YtdO
    • 2024-01-05_18:47:45.102643_pltD
    • 2024-01-05_18:47:45.102649_MJkq
    • 2024-01-05_18:47:45.102654_uwlG
    • 2024-01-05_18:47:45.102659_wXcK
    • 2024-01-05_18:47:45.102667_VlHh
    • 2024-01-05_18:47:45.102676_tapf
    • 2024-01-05_18:47:45.102692_bTDF
    • 2024-01-05_18:47:45.102701_McSA
    • 2024-01-05_18:47:45.102708_FFqO
    8c51947
    • 2024-01-09_17:00:36.109598_ikBd
    • 2024-01-09_17:00:36.109632_ROvs
    • 2024-01-09_17:00:36.109644_dvAz
    • 2024-01-09_17:00:36.109654_wTuh
    • 2024-01-09_17:00:36.109663_iDqV
    • 2024-01-09_17:00:36.109669_NdXs
    • 2024-01-09_17:00:36.109673_rrIy
    • 2024-01-09_17:00:36.109682_tkhH
    • 2024-01-09_17:00:36.109686_qkfy
    • 2024-01-09_17:00:36.109690_xAWS
  • fire-sessions

    DeviceStatisticsDistributions
    oriole-32
    Percentileeb3380e8c51947DiffSignificant (?)
    p107.69 ±1 ms7.21 ±2 ms-474 μs (-6.2%)NO
    p258.20 ±1 ms7.66 ±2 ms-538 μs (-6.6%)NO
    p508.84 ±1 ms8.33 ±2 ms-508 μs (-5.7%)NO
    p759.83 ±1 ms9.37 ±2 ms-460 μs (-4.7%)NO
    p9011.2 ±2 ms10.7 ±2 ms-543 μs (-4.8%)NO

    20 test runs in comparison
    CommitTest Runs
    eb3380e
    • 2024-01-05_18:47:45.102608_YtdO
    • 2024-01-05_18:47:45.102643_pltD
    • 2024-01-05_18:47:45.102649_MJkq
    • 2024-01-05_18:47:45.102654_uwlG
    • 2024-01-05_18:47:45.102659_wXcK
    • 2024-01-05_18:47:45.102667_VlHh
    • 2024-01-05_18:47:45.102676_tapf
    • 2024-01-05_18:47:45.102692_bTDF
    • 2024-01-05_18:47:45.102701_McSA
    • 2024-01-05_18:47:45.102708_FFqO
    8c51947
    • 2024-01-09_17:00:36.109598_ikBd
    • 2024-01-09_17:00:36.109632_ROvs
    • 2024-01-09_17:00:36.109644_dvAz
    • 2024-01-09_17:00:36.109654_wTuh
    • 2024-01-09_17:00:36.109663_iDqV
    • 2024-01-09_17:00:36.109669_NdXs
    • 2024-01-09_17:00:36.109673_rrIy
    • 2024-01-09_17:00:36.109682_tkhH
    • 2024-01-09_17:00:36.109686_qkfy
    • 2024-01-09_17:00:36.109690_xAWS
    redfin-30
    Percentileeb3380e8c51947DiffSignificant (?)
    p1011.7 ±1 ms12.3 ±3 ms+593 μs (+5.1%)NO
    p2512.3 ±2 ms13.3 ±4 ms+1.00 ms (+8.2%)NO
    p5013.6 ±2 ms14.7 ±5 ms+1.13 ms (+8.3%)NO
    p7518.3 ±2 ms18.9 ±5 ms+631 μs (+3.4%)NO
    p9020.7 ±2 ms21.8 ±6 ms+1.12 ms (+5.4%)NO

    20 test runs in comparison
    CommitTest Runs
    eb3380e
    • 2024-01-05_18:47:45.102608_YtdO
    • 2024-01-05_18:47:45.102643_pltD
    • 2024-01-05_18:47:45.102649_MJkq
    • 2024-01-05_18:47:45.102654_uwlG
    • 2024-01-05_18:47:45.102659_wXcK
    • 2024-01-05_18:47:45.102667_VlHh
    • 2024-01-05_18:47:45.102676_tapf
    • 2024-01-05_18:47:45.102692_bTDF
    • 2024-01-05_18:47:45.102701_McSA
    • 2024-01-05_18:47:45.102708_FFqO
    8c51947
    • 2024-01-09_17:00:36.109598_ikBd
    • 2024-01-09_17:00:36.109632_ROvs
    • 2024-01-09_17:00:36.109644_dvAz
    • 2024-01-09_17:00:36.109654_wTuh
    • 2024-01-09_17:00:36.109663_iDqV
    • 2024-01-09_17:00:36.109669_NdXs
    • 2024-01-09_17:00:36.109673_rrIy
    • 2024-01-09_17:00:36.109682_tkhH
    • 2024-01-09_17:00:36.109686_qkfy
    • 2024-01-09_17:00:36.109690_xAWS
  • timeToInitialDisplay

    DeviceStatisticsDistributions
    oriole-32
    Percentileeb3380e8c51947DiffSignificant (?)
    p10209 ±9.7 ms207 ±5 ms-1.45 ms (-0.7%)NO
    p25216 ±9 ms213 ±5 ms-2.33 ms (-1.1%)NO
    p50223 ±10 ms222 ±6 ms-1.10 ms (-0.5%)NO
    p75231 ±12 ms231 ±7 ms+503 μs (+0.2%)NO
    p90240 ±13 ms242 ±8 ms+1.74 ms (+0.7%)NO

    20 test runs in comparison
    CommitTest Runs
    eb3380e
    • 2024-01-05_18:47:45.102608_YtdO
    • 2024-01-05_18:47:45.102643_pltD
    • 2024-01-05_18:47:45.102649_MJkq
    • 2024-01-05_18:47:45.102654_uwlG
    • 2024-01-05_18:47:45.102659_wXcK
    • 2024-01-05_18:47:45.102667_VlHh
    • 2024-01-05_18:47:45.102676_tapf
    • 2024-01-05_18:47:45.102692_bTDF
    • 2024-01-05_18:47:45.102701_McSA
    • 2024-01-05_18:47:45.102708_FFqO
    8c51947
    • 2024-01-09_17:00:36.109598_ikBd
    • 2024-01-09_17:00:36.109632_ROvs
    • 2024-01-09_17:00:36.109644_dvAz
    • 2024-01-09_17:00:36.109654_wTuh
    • 2024-01-09_17:00:36.109663_iDqV
    • 2024-01-09_17:00:36.109669_NdXs
    • 2024-01-09_17:00:36.109673_rrIy
    • 2024-01-09_17:00:36.109682_tkhH
    • 2024-01-09_17:00:36.109686_qkfy
    • 2024-01-09_17:00:36.109690_xAWS
    redfin-30
    Percentileeb3380e8c51947DiffSignificant (?)
    p10248 ±3 ms272 ±3 ms+24.7 ms (+10.0%)YES
    p25254 ±3 ms279 ±3 ms+25.1 ms (+9.9%)YES
    p50262 ±3 ms286 ±3 ms+24.8 ms (+9.5%)YES
    p75270 ±4 ms296 ±3 ms+26.8 ms (+9.9%)YES
    p90282 ±7 ms309 ±5 ms+26.8 ms (+9.5%)MAYBE

    20 test runs in comparison
    CommitTest Runs
    eb3380e
    • 2024-01-05_18:47:45.102608_YtdO
    • 2024-01-05_18:47:45.102643_pltD
    • 2024-01-05_18:47:45.102649_MJkq
    • 2024-01-05_18:47:45.102654_uwlG
    • 2024-01-05_18:47:45.102659_wXcK
    • 2024-01-05_18:47:45.102667_VlHh
    • 2024-01-05_18:47:45.102676_tapf
    • 2024-01-05_18:47:45.102692_bTDF
    • 2024-01-05_18:47:45.102701_McSA
    • 2024-01-05_18:47:45.102708_FFqO
    8c51947
    • 2024-01-09_17:00:36.109598_ikBd
    • 2024-01-09_17:00:36.109632_ROvs
    • 2024-01-09_17:00:36.109644_dvAz
    • 2024-01-09_17:00:36.109654_wTuh
    • 2024-01-09_17:00:36.109663_iDqV
    • 2024-01-09_17:00:36.109669_NdXs
    • 2024-01-09_17:00:36.109673_rrIy
    • 2024-01-09_17:00:36.109682_tkhH
    • 2024-01-09_17:00:36.109686_qkfy
    • 2024-01-09_17:00:36.109690_xAWS

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

@mrober mrober merged commit ba067b5 into master Jan 9, 2024
@mrober mrober deleted the sessions-datastorecur branch January 9, 2024 20:51
@firebase firebase locked and limited conversation to collaborators Feb 9, 2024
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