Skip to content

Handle error when stream was cancelled prior to calling halfClose. #6894

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
Apr 21, 2025

Conversation

tom-andersen
Copy link
Contributor

This should fix issue #6883

Copy link
Contributor

github-actions bot commented Apr 17, 2025

📝 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.

Copy link
Contributor

Vertex AI Mock Responses Check ⚠️

A newer major version of the mock responses for Vertex AI unit tests is available. update_responses.sh should be updated to clone the latest version of the responses: v10.0

@tom-andersen tom-andersen linked an issue Apr 17, 2025 that may be closed by this pull request
@google-oss-bot
Copy link
Contributor

Coverage Report 1

Affected Products

  • firebase-firestore

    Overall coverage changed from 45.78% (51b4a1c) to 45.76% (e164d1f) by -0.02%.

    FilenameBase (51b4a1c)Merge (e164d1f)Diff
    AbstractStream.java80.21%78.65%-1.57%
    LruGarbageCollector.java97.27%93.64%-3.64%
    PatchMutation.java100.00%98.39%-1.61%

Test Logs

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

Copy link
Contributor

Test Results

  186 files  +  120    186 suites  +120   4m 33s ⏱️ + 3m 17s
1 235 tests +  683  1 219 ✅ +  668  16 💤 +15  0 ❌ ±0 
2 494 runs  +1 390  2 462 ✅ +1 360  32 💤 +30  0 ❌ ±0 

Results for commit d17fbc9. ± Comparison against base commit 51b4a1c.

This pull request removes 552 and adds 1235 tests. Note that renamed tests count towards both.
com.google.firebase.dataconnect.AnyValueSerializerUnitTest ‑ descriptor should have expected values
com.google.firebase.dataconnect.AnyValueSerializerUnitTest ‑ deserialize() should throw UnsupportedOperationException
com.google.firebase.dataconnect.AnyValueSerializerUnitTest ‑ serialize() should throw UnsupportedOperationException
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(Boolean) creates an object with the expected value
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(Double) creates an object with the expected value (edge cases)
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(Double) creates an object with the expected value (normal cases)
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(List) creates an object with the expected value (edge cases)
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(List) creates an object with the expected value (normal cases)
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(Map) creates an object with the expected value (edge cases)
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(Map) creates an object with the expected value (normal cases)
…
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
com.google.firebase.firestore.DocumentChangeTest ‑ randomTests
com.google.firebase.firestore.DocumentChangeTest ‑ testAdditions
com.google.firebase.firestore.DocumentChangeTest ‑ testChangesWithSortOrderChange
com.google.firebase.firestore.DocumentChangeTest ‑ testDeletions
…
This pull request removes 1 skipped test and adds 16 skipped tests. Note that renamed tests count towards both.
com.google.firebase.dataconnect.ProtoStructDecoderUnitTest ‑ decodeFromStruct() can encode and decode a list of non-nullable Unit
com.google.firebase.firestore.FirestoreRegistrarTest ‑ storageRegistrar_getComponents_publishesLibVersionComponent
com.google.firebase.firestore.local.MemoryLocalStoreTest ‑ testDoesNotReplaceResumeTokenWithEmptyByteString
com.google.firebase.firestore.local.MemoryLocalStoreTest ‑ testHandlesSetMutationThenAckThenTransformThenAckThenTransform
com.google.firebase.firestore.local.MemoryLocalStoreTest ‑ testIgnoresTargetMappingAfterExistenceFilterMismatch
com.google.firebase.firestore.local.MemoryLocalStoreTest ‑ testPersistsResumeTokens
com.google.firebase.firestore.local.MemoryLocalStoreTest ‑ testQueriesFilterDocumentsThatNoLongerMatch
com.google.firebase.firestore.local.MemoryLocalStoreTest ‑ testQueriesIncludeDocumentsFromOtherQueries
com.google.firebase.firestore.local.MemoryLocalStoreTest ‑ testQueriesIncludeLocallyModifiedDocuments
com.google.firebase.firestore.local.MemoryLocalStoreTest ‑ testUsesTargetMappingToExecuteQueries
com.google.firebase.firestore.local.SQLiteLocalStoreTest ‑ testCollectsGarbageAfterAcknowledgedMutation
…

@google-oss-bot
Copy link
Contributor

Size Report 1

Affected Products

  • firebase-firestore

    TypeBase (51b4a1c)Merge (e164d1f)Diff
    aar1.45 MB1.45 MB+82 B (+0.0%)
    apk (release)11.4 MB11.4 MB+136 B (+0.0%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

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
    Percentile51b4a1ce164d1fDiffSignificant (?)
    p10262 ±13 μs254 ±16 μs-8.05 μs (-3.1%)NO
    p25271 ±16 μs262 ±18 μs-9.62 μs (-3.5%)NO
    p50289 ±26 μs276 ±25 μs-13.3 μs (-4.6%)NO
    p75336 ±63 μs310 ±61 μs-26.2 μs (-7.8%)NO
    p90394 ±81 μs389 ±93 μs-5.39 μs (-1.4%)NO

    20 test runs in comparison
    CommitTest Runs
    51b4a1c
    • 2025-04-16_19:58:17.110055_roZg
    • 2025-04-16_19:58:17.110092_lFvN
    • 2025-04-16_19:58:17.110103_agxz
    • 2025-04-16_19:58:17.110112_OSvX
    • 2025-04-16_19:58:17.110118_jVyB
    • 2025-04-16_19:58:17.110125_HNaK
    • 2025-04-16_19:58:17.110132_UYnC
    • 2025-04-16_19:58:17.110139_UNuP
    • 2025-04-16_19:58:17.110145_hYUz
    • 2025-04-16_19:58:17.110152_GQkO
    e164d1f
    • 2025-04-17_15:10:14.842686_sRvP
    • 2025-04-17_15:10:14.842725_rALF
    • 2025-04-17_15:10:14.842735_UvXP
    • 2025-04-17_15:10:14.842743_hdwF
    • 2025-04-17_15:10:14.842750_WZFN
    • 2025-04-17_15:10:14.842757_ahkV
    • 2025-04-17_15:10:14.842771_Ottn
    • 2025-04-17_15:10:14.842779_kfUG
    • 2025-04-17_15:10:14.842787_MlFQ
    • 2025-04-17_15:10:14.842794_sqCF
    redfin-30
    Percentile51b4a1ce164d1fDiffSignificant (?)
    p10519 ±49 μs510 ±51 μs-9.58 μs (-1.8%)NO
    p25540 ±51 μs523 ±51 μs-17.6 μs (-3.3%)NO
    p50563 ±52 μs541 ±50 μs-21.2 μs (-3.8%)NO
    p75598 ±61 μs568 ±54 μs-29.9 μs (-5.0%)NO
    p90647 ±90 μs594 ±54 μs-53.3 μs (-8.2%)NO

    20 test runs in comparison
    CommitTest Runs
    51b4a1c
    • 2025-04-16_19:58:17.110055_roZg
    • 2025-04-16_19:58:17.110092_lFvN
    • 2025-04-16_19:58:17.110103_agxz
    • 2025-04-16_19:58:17.110112_OSvX
    • 2025-04-16_19:58:17.110118_jVyB
    • 2025-04-16_19:58:17.110125_HNaK
    • 2025-04-16_19:58:17.110132_UYnC
    • 2025-04-16_19:58:17.110139_UNuP
    • 2025-04-16_19:58:17.110145_hYUz
    • 2025-04-16_19:58:17.110152_GQkO
    e164d1f
    • 2025-04-17_15:10:14.842686_sRvP
    • 2025-04-17_15:10:14.842725_rALF
    • 2025-04-17_15:10:14.842735_UvXP
    • 2025-04-17_15:10:14.842743_hdwF
    • 2025-04-17_15:10:14.842750_WZFN
    • 2025-04-17_15:10:14.842757_ahkV
    • 2025-04-17_15:10:14.842771_Ottn
    • 2025-04-17_15:10:14.842779_kfUG
    • 2025-04-17_15:10:14.842787_MlFQ
    • 2025-04-17_15:10:14.842794_sqCF
  • timeToInitialDisplay

    DeviceStatisticsDistributions
    oriole-32
    Percentile51b4a1ce164d1fDiffSignificant (?)
    p10198 ±5 ms200 ±4 ms+2.81 ms (+1.4%)NO
    p25204 ±4 ms206 ±4 ms+2.31 ms (+1.1%)NO
    p50211 ±5 ms213 ±3 ms+1.97 ms (+0.9%)NO
    p75218 ±5 ms221 ±4 ms+2.89 ms (+1.3%)NO
    p90226 ±6 ms232 ±4 ms+5.30 ms (+2.3%)NO

    20 test runs in comparison
    CommitTest Runs
    51b4a1c
    • 2025-04-16_19:58:17.110055_roZg
    • 2025-04-16_19:58:17.110092_lFvN
    • 2025-04-16_19:58:17.110103_agxz
    • 2025-04-16_19:58:17.110112_OSvX
    • 2025-04-16_19:58:17.110118_jVyB
    • 2025-04-16_19:58:17.110125_HNaK
    • 2025-04-16_19:58:17.110132_UYnC
    • 2025-04-16_19:58:17.110139_UNuP
    • 2025-04-16_19:58:17.110145_hYUz
    • 2025-04-16_19:58:17.110152_GQkO
    e164d1f
    • 2025-04-17_15:10:14.842686_sRvP
    • 2025-04-17_15:10:14.842725_rALF
    • 2025-04-17_15:10:14.842735_UvXP
    • 2025-04-17_15:10:14.842743_hdwF
    • 2025-04-17_15:10:14.842750_WZFN
    • 2025-04-17_15:10:14.842757_ahkV
    • 2025-04-17_15:10:14.842771_Ottn
    • 2025-04-17_15:10:14.842779_kfUG
    • 2025-04-17_15:10:14.842787_MlFQ
    • 2025-04-17_15:10:14.842794_sqCF
    redfin-30
    Percentile51b4a1ce164d1fDiffSignificant (?)
    p10227 ±5 ms248 ±3 ms+21.3 ms (+9.4%)MAYBE
    p25232 ±5 ms255 ±2 ms+22.5 ms (+9.7%)MAYBE
    p50239 ±4 ms263 ±3 ms+24.6 ms (+10.3%)YES
    p75246 ±4 ms272 ±3 ms+26.2 ms (+10.6%)YES
    p90255 ±5 ms287 ±6 ms+31.4 ms (+12.3%)YES

    20 test runs in comparison
    CommitTest Runs
    51b4a1c
    • 2025-04-16_19:58:17.110055_roZg
    • 2025-04-16_19:58:17.110092_lFvN
    • 2025-04-16_19:58:17.110103_agxz
    • 2025-04-16_19:58:17.110112_OSvX
    • 2025-04-16_19:58:17.110118_jVyB
    • 2025-04-16_19:58:17.110125_HNaK
    • 2025-04-16_19:58:17.110132_UYnC
    • 2025-04-16_19:58:17.110139_UNuP
    • 2025-04-16_19:58:17.110145_hYUz
    • 2025-04-16_19:58:17.110152_GQkO
    e164d1f
    • 2025-04-17_15:10:14.842686_sRvP
    • 2025-04-17_15:10:14.842725_rALF
    • 2025-04-17_15:10:14.842735_UvXP
    • 2025-04-17_15:10:14.842743_hdwF
    • 2025-04-17_15:10:14.842750_WZFN
    • 2025-04-17_15:10:14.842757_ahkV
    • 2025-04-17_15:10:14.842771_Ottn
    • 2025-04-17_15:10:14.842779_kfUG
    • 2025-04-17_15:10:14.842787_MlFQ
    • 2025-04-17_15:10:14.842794_sqCF

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

@ehsannas ehsannas assigned tom-andersen and unassigned ehsannas Apr 21, 2025
@tom-andersen tom-andersen merged commit fda3351 into main Apr 21, 2025
60 of 67 checks passed
@tom-andersen tom-andersen deleted the tomandersen/issue6883 branch April 21, 2025 21:51
@@ -1,5 +1,6 @@
# Unreleased
* [fixed] Fixed the `null` value handling in `whereNotEqualTo` and `whereNotIn` filters.
* [fixed] Catch exception when stream is already cancelled during close. [#6894](//github.com/firebase/firebase-android-sdk/pull/6894)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest rewording this changelog entry to call out the issue that the customer would experience that is fixed, maybe something like

Fix intermittent IllegalStateException: "call was cancelled" when closing Firestore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash in Firestore: IllegalStateException - call was cancelled
4 participants