Server‑Side LIST pagination: when does a continue token expire?
0 reputation · 10 Nov 2024, 14:18 UTC
Server‑Side LIST pagination: when does a continue token expire?
When exporting a large set of objects with the API server’s LIST chunking, clients supply limit and receive a continue token in metadata.continue. The next call repeats the query with that token. In practice, the token is tied to a snapshot resourceVersion, and if the snapshot becomes stale or the underlying data changes, the server may return 410 Gone or ResourceExpired. This behavior is documented but not fully exposed in client examples, leaving teams uncertain about how long a token remains valid or what triggers expiration.
Key uncertainties include:
- What specific conditions cause the API server to reject a continue token?
- Is there a documented timeout or resourceVersion mismatch that triggers a 410 Gone?
- When a token is invalid, should a client restart the LIST from the beginning or attempt a fallback strategy?