mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-31 12:06:44 +00:00
Pass the last_replicas from the page_state as the preferred_replicas for query() and save the returned last_replicas as the last_replicas field of the next page_state. The circle is now complete. The first page of any query will pass an empty list as the preferred replicas (having no previous paging_state) so the replicas will be selected according to the load-balancing strategy. Any subsequent page will use the last replicas from the last page as the preferred ones for the current one. Thus if all goes well all pages of a query will hit the same replicas.