You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Caleb Rackliffe (Jira)" <ji...@apache.org> on 2020/07/08 17:53:00 UTC
[jira] [Commented] (CASSANDRA-15920) SimpleQueryResult should
contain client warnings
[ https://issues.apache.org/jira/browse/CASSANDRA-15920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17153810#comment-17153810 ]
Caleb Rackliffe commented on CASSANDRA-15920:
---------------------------------------------
[~dcapwell] Thanks for reviewing.
I've fixed up the tow minor PR comments (including adding warning hooks to the {{Builder}}).
I'm definitely inclined to leave paging support out of scope for now, and I've modified the implementation in {{IteratorQueryResult}} to make this more obvious.
If we want to support that in the future, there are two pieces. The first would be collecting the thread-local warnings in the right place. In the paging case, one way to do that would be to wrap our calls to {{QueryPager#fetchPage()}} in {{FromDistributedPager}} with calls to {{ClientWarn#captureWarnings(}} and {{ClientWarn#getWarnings()}}. The result of the latter could be thrown into something like a copy-on-write list. The {{FromDistributedPager}} could then be used as a supplier in {{IteratorQueryResult}}, given we'll only have warnings after actual pages have been fetched in the former.
> SimpleQueryResult should contain client warnings
> ------------------------------------------------
>
> Key: CASSANDRA-15920
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15920
> Project: Cassandra
> Issue Type: Improvement
> Components: Test/dtest
> Reporter: Caleb Rackliffe
> Assignee: Caleb Rackliffe
> Priority: Normal
> Labels: pull-request-available
> Fix For: 4.0-beta
>
>
> There isn't a way to get query warnings generated via \{{ClientWarn}} using the existing \{{ICoordinator}} interface. The simplest possible change here would be to...
> 1.) Make sure we activate warning collection before queries start.
> 2.) Rip warnings out of \{{ClientWarn}} when queries return.
> 3.) Include those warnings when we create \{{SimpleQueryResult}}.
> {\{QueryResult}} might not need to expose the warnings, given not all its implementations would be expected to have them, but we could just return an empty list of warnings by default.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org