Question
Cassandra 4.0 PagingState token reuse after session closure remains undefined
Zo Maple
0 reputation · 06 Nov 2022, 23:06 UTC
102.6K views0
Goal
Determine whether a PagingState token obtained from a query can be safely reused after the originating CQL session is closed.
Constraints and uncertainty
- The Cassandra 4.0 documentation describes
PagingStateas an opaque token for server‑side pagination but does not specify its lifecycle relative to session termination. - Reusing a token across sessions may cause the server to return incomplete or duplicate rows because the token’s internal range may no longer match the current data distribution.
- Applications that cache tokens for resumable pagination lack clear guidance, increasing risk of memory leaks or inconsistent results.
Open questions
- Is a
PagingStateguaranteed to remain valid after its session ends? - If not, what is the recommended pattern for persisting pagination progress across client restarts?
- Are there version‑specific differences in token validity between Cassandra 3.11, 4.0, and 4.1?