You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a lengthy retry system with sentry error reporting to see how many
retries we max out at.
### Change type
- [x] `other`
### API changes
internal changes only
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Introduce persistence retry with thresholds, analytics logging, and
client notifications; add custom server events and update retry util
signature.
>
> - **Sync Worker**:
> - **Persistence Retries**: Wrap `persistToDatabase` in `retry(...)`
with up to `PERSIST_RETRIES_MAX` attempts; log `persist_success` with
attempt count.
> - **Client Notifications**: Broadcast `TLCustomServerEvent`
(`persistence_bad` at threshold, `persistence_good` on recovery) via
`broadcastPersistenceEvent`.
> - **Analytics**: Extend `logEvent` to handle `persist_success`;
improved error logging on DB update.
> - **Constants**: Add `PERSIST_RETRIES_NOTIFY_THRESHOLD` and
`PERSIST_RETRIES_MAX`.
> - **Client**:
> - Track custom server events by adding `onCustomMessageReceived` in
`useSync` and calling `trackEvent(message.type)`.
> - **Shared/Utils**:
> - Add `TLCustomServerEvent` type in `@tldraw/dotcom-shared`.
> - Change `retry` signature to pass `{ attempt, remaining, total }`;
update API report accordingly.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
6980329. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
0 commit comments