| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…aConnectBidiConnectStream
…instead of defaulting to no jitter
|
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here. Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
Sorry, something went wrong.
|
/gemini review |
Sorry, something went wrong.
There was a problem hiding this comment.
This pull request refactors the backoff calculation mechanism in Firebase Data Connect to support customizable random jitter. The RetryBackoffCalculator now requires a jitter generator function, and a Random instance is passed down from the registrar through the factory, implementation, and gRPC classes to the stream. Unit tests have been updated and expanded with a new helper file RetryBackoffCalculatorTesting.kt to verify exponential backoff behavior under various jitter conditions. No review comments were provided, so there is no additional feedback.
Sorry, something went wrong.
📝 PRs merging into main branchOur 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. |
Sorry, something went wrong.
diff --git a/firebase-dataconnect/CHANGELOG.md b/firebase-dataconnect/CHANGELOG.md index 4bd4dc2..27cac5d 100644 --- a/firebase-dataconnect/CHANGELOG.md +++ b/firebase-dataconnect/CHANGELOG.md @@ -7,6 +7,10 @@ [#8446](#8446), [#8456](#8456), [#8460](#8460)) +- [changed] Wait for 15 seconds before closing realtime streaming connection + with backend after last subscriber unsubscribes (instead of closing the + connection immediately). + ([#NNNN](https://github.com/firebase/firebase-android-sdk/pull/NNNN)) # 17.3.2
| Back | FazBrowse Home | New Git URL |
This PR integrates random jitter into the exponential backoff strategy used by firebase-dataconnect when reconnecting query subscriptions. This is achieved by wiring a Random instance from FirebaseDataConnectRegistrar through to DataConnectBidiConnectStream to introduce random jitter between -0.5 and 0.5 to the exponential backoff calculation. This helps reduce thundering herd problems on reconnects.
Highlights
- Jittered Exponential Backoff: Configured DataConnectBidiConnectStream to use a random jitter factor (varying between -0.5 and 0.5) with RetryBackoffCalculator for reconnecting query subscriptions.
- Random Source Wiring: Threaded a Random instance from FirebaseDataConnectRegistrar down through FirebaseDataConnectFactory, FirebaseDataConnectImpl, and DataConnectGrpcRPCs to DataConnectBidiConnectStream.
- Improved Test Coverage: Expanded the subscription retry tests in QuerySubscriptionImplUnitTest to cover zero, minimum, maximum, and varying jitter using property-based tests.
- Test Code Consolidation: Created RetryBackoffCalculatorTesting to share common backoff test constants and generators, reducing duplication across test files.
Changelog