[
https://issues.apache.org/jira/browse/CASSANDRA-17520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17518349#comment-17518349
]
David Capwell commented on CASSANDRA-17520:
-------------------------------------------
Starting commit
CI Results (pending):
||Branch||Source||Circle CI||Jenkins||
|trunk|[branch|https://github.com/dcapwell/cassandra/tree/commit_remote_branch/CASSANDRA-17520-trunk-57DA9F35-6C35-4DCC-9CB4-26103D04E6C3]|[build|https://app.circleci.com/pipelines/github/dcapwell/cassandra?branch=commit_remote_branch%2FCASSANDRA-17520-trunk-57DA9F35-6C35-4DCC-9CB4-26103D04E6C3]|[build|https://ci-cassandra.apache.org/job/Cassandra-devbranch/1573/]|
> repair vtables should expose a completed field due to lack of filtering
> options in CQL
> --------------------------------------------------------------------------------------
>
> Key: CASSANDRA-17520
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17520
> Project: Cassandra
> Issue Type: Improvement
> Components: Consistency/Repair, CQL/Syntax
> Reporter: David Capwell
> Assignee: David Capwell
> Priority: Normal
> Fix For: 4.x
>
>
> To find repairs actively running, we need to run the following command
> {code}
> SELECT *
> FROM system_views.repairs
> WHERE status IN ('setup', 'start', 'prepare_start', 'prepare_complete',
> 'repair_start', 'repair_complete')
> ALLOW FILTERING;
> {code}
> This is annoying, and a problem if more states are added in the future….
> Ideally we would do one of the following
> NOT IN:
> {code}
> status NOT IN (’success’, ’skip’, ‘failure’)
> {code}
> But this is not currently supported
> {code}
> cqlsh> select * from system_views.repairs WHERE duration_millis > 10 AND
> status NOT IN ('success', 'failure') ALLOW FILTERING;
> SyntaxException: line 1:73 no viable alternative at input 'NOT' (...WHERE
> duration_millis > 10 AND [status] NOT...)
> {code}
> Not Equals
> {code}
> cqlsh> select * from system_views.repairs WHERE duration_millis > 10 AND
> status != 'success' AND status !='failure' ALLOW FILTERING;
> InvalidRequest: Error from server: code=2200 [Invalid query]
> message="Unsupported "!=" relation: status != 'success'"
> {code}
> This also fails
> {code}
> cqlsh> select * from system_views.repairs WHERE duration_millis > 10 AND
> status != 'success' AND status !='failure' ALLOW FILTERING;
> InvalidRequest: Error from server: code=2200 [Invalid query]
> message="Unsupported "!=" relation: status != 'success'"
> {code}
> NULL Checking
> {code}
> state_success_timestamp IS NULL AND state_failure_timestamp IS NULL
> — OR
> state_success_timestamp=null AND state_failure_timestamp=null
> {code}
> This also fails
> {code}
> cqlsh> select * from system_views.repairs WHERE duration_millis > 10 AND
> state_success_timestamp IS NULL ALLOW FILTERING;
> SyntaxException: line 1:93 mismatched input 'NULL' expecting K_NOT (...> 10
> AND state_success_timestamp IS [NULL]…)
> cqlsh> select * from system_views.repairs WHERE duration_millis > 10 AND
> state_success_timestamp=null ALLOW FILTERING;
> InvalidRequest: Error from server: code=2200 [Invalid query]
> message="Unsupported null value for column state_success_timestamp"
> {code}
> Given that our filtering logic is restrictive, we need a column to expose if
> completed or not, so filtering works
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]