[
https://issues.apache.org/jira/browse/CASSANDRA-14311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16400619#comment-16400619
]
Avi Kivity commented on CASSANDRA-14311:
----------------------------------------
{quote}We would need to add some hints here about the token ranges covered by
the query for the driver to use.
{quote}
There's no need for hints. You send the first page (which will likely miss the
replica), and in addition to has_more_pages you also get a token for the next
page.
We could also optimize the first page by providing more metadata. There are a
few cases to consider:
# SELECT ... FROM ... WHERE token(pk) >= ?
# SELECT ... FROM ... WHERE token(pk) >= token(?)
# SELECT ... FROM ... WHERE (no lower-bound specified)
(1 and 2 also need to support >).
If the metadata describes these cases, then we can send the first page query to
a coordinator that is also a replica.
> Allow Token-Aware drivers for range scans
> -----------------------------------------
>
> Key: CASSANDRA-14311
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14311
> Project: Cassandra
> Issue Type: Improvement
> Components: Coordination
> Reporter: Avi Kivity
> Priority: Major
>
> Currently, range scans are not token aware. This means that an extra hop is
> needed for most requests. Since range scans are usually data intensive, this
> causes significant extra traffic.
>
> Token awareness could be enabled by having the coordinator return the token
> for the next (still unread) row in the response, so the driver can select a
> next coordinator that owns this row.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]