Repository navigation
MOBILE-541: Keep events on 429 - #846
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Recovered transactions remain in retriedInRoundTransactionIds, allowing completeRound() to double the global retry delay when only an unrelated event’s first-attempt failure remains.
1 open issue
What changed in this PR
This PR updates the SDK’s guaranteed-delivery queue to retain events after HTTP 429 responses and pause retries for the affected operation.
Changes:
- Adds per-operation throttling pauses and adaptive retry delays for server failures.
- Handles clock rollback in retry selection and event age calculations.
- Resets delivery state during reinitialization and expands regression coverage.
| File | Description |
|---|---|
| MindboxTests/Network/MBEventRepositorySendRawTests.swift | Supplies the new delivery-manager dependencies. |
| MindboxTests/Mock/MockEvent.swift | Clamps mock event age to zero. |
| MindboxTests/GuaranteedDelivery/GuaranteedDeliveryTestCase.swift | Tests throttling, retry delays, recovery, and queue scheduling. |
| MindboxTests/Database/DatabaseRepositoryTestCase.swift | Tests retry selection and offsets after clock changes. |
| Mindbox/Model/Event.swift | Prevents negative event age offsets. |
| Mindbox/GuaranteedDeliveryManager/GuaranteedDeliveryManager.swift | Integrates pause and retry-delay management into scheduling. |
| Mindbox/GuaranteedDeliveryManager/DeliveryOperation.swift | Classifies delivery outcomes and manages pauses and backoff. |
| Mindbox/Database/Entities/CDEvent+CoreDataProperties.swift | Includes retries with future timestamps after clock rollback. |
| Mindbox/CoreController/CoreController.swift | Clears delivery pauses and retry delays during reinitialization. |
Review effort: Balanced
Contributor
|
…erver failure in the same round
added 2 commits
November 13, 2026 15:57
… events and keep schedule requests made during an empty pass
…quested during it
Vailence
approved these changes
Nov 16, 2026
…tion and call the fetch handler outside the semaphore
justSmK
approved these changes
Nov 16, 2026
justSmK
left a comment
Collaborator
There was a problem hiding this comment.
Апрув. Старт прохода после истечения фоновой задачи (отмена во время выборки, между проходами, после проверки уведомлений) есть и на develop — делаем отдельной задачей.
MOBILE-548: Send the age of an event as dateTimeOffset on its first attempt too
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

https://tracker.yandex.ru/MOBILE-541