Skip to content

MOBILE-541: Keep events on 429 - #846

Merged
Vailence merged 9 commits into
mission/transactional-pushfrom
feature/MOBILE-541
Nov 20, 2026
Merged

Vailence merged 9 commits into
mission/transactional-pushfrom
feature/MOBILE-541

Conversation

@sergeysozinov

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor
TestsPassed ✅SkippedFailedTime ⏱
Unit tests report3162 ran3162 ✅4m 17s 989ms

sozinov added 2 commits November 13, 2026 15:57
…tion and call the fetch handler outside the semaphore

@justSmK justSmK left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Апрув. Старт прохода после истечения фоновой задачи (отмена во время выборки, между проходами, после проверки уведомлений) есть и на develop — делаем отдельной задачей.

MOBILE-548: Send the age of an event as dateTimeOffset on its first attempt too
@Vailence
Vailence changed the base branch from develop to mission/transactional-push November 19, 2026 11:59
@Vailence
Vailence merged commit 4b22c73 into mission/transactional-push Nov 20, 2026
10 checks passed
@Vailence
Vailence deleted the feature/MOBILE-541 branch November 20, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants