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
return all, nil // Caller cannot paginate; entire dataset loaded into memory
71
+
}
72
+
```
73
+
74
+
**Why it's bad:** The SDK drives the pagination loop — it calls `List()`, `Entitlements()`, and `Grants()` repeatedly with incrementing tokens. If the connector paginates internally (in the SDK method itself or inside the HTTP client), the SDK only ever calls the method once and receives all results at once. This:
75
+
- Breaks checkpointing: if a sync crashes mid-run, it cannot resume from the last page
76
+
- Loads the entire dataset into memory at once (OOM for orgs with 100k+ users)
77
+
- Bypasses any rate limiting or backpressure the SDK applies between pages
78
+
- Causes detached contexts and timeouts: the SDK manages context lifetimes and deadlines per page call; a long-running internal loop outlives the context the SDK intended for a single page, leading to cancelled requests and hard-to-diagnose timeout errors
79
+
80
+
There are no exceptions. HTTP client methods must always accept a cursor/token parameter and return a single page.
81
+
82
+
**Do instead:**
83
+
```go
84
+
// HTTP client: always return one page + next token
0 commit comments