[
https://issues.apache.org/jira/browse/CASSANDRA-13872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16233614#comment-16233614
]
Jordan Vaughan edited comment on CASSANDRA-13872 at 11/1/17 3:48 AM:
---------------------------------------------------------------------
[~rustyrazorblade], thanks! But is it really case-sensitive? Here's what I
see in {{schema/SpeculativeRetryParam.java}}:
{code:java}
public static SpeculativeRetryParam fromString(String value)
{
// ...
if
(value.toUpperCase(Locale.ENGLISH).endsWith(Kind.PERCENTILE.toString()))
{
// Parse Double value...
}
// ...
}
{code}
Doesn't this handle all case combinations?
I've also tested various combos in cqlsh(1) in my Docker instance:
{noformat}
root@4b8036840324:/# cqlsh
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.11.1 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
cqlsh> create keyspace foo with replication = {'class': 'SimpleStrategy',
'replication_factor': 1};
cqlsh> use foo;
cqlsh:foo> create table bar (id bigint, name text, primary key (id));
cqlsh:foo> alter table bar with speculative_retry= '88percentile';
cqlsh:foo> alter table bar with speculative_retry= '88percentIle';
cqlsh:foo> alter table bar with speculative_retry= '88PeRcEnTiLe';
cqlsh:foo> create table baz (id bigint, name text, primary key (id)) with
speculative_retry = '50pErCeNtIlE';
cqlsh:foo>
{noformat}
There weren't any issues.
I also noticed that [the trunk
code|https://github.com/apache/cassandra/commit/3fe31ffddb6a57e0ff89a813f724cd74133052db]
now accepts a 'P' suffix for "PERCENTILE" (as of commit
{{3fe31ffddb6a57e0ff89a813f724cd74133052db}}). I didn't see that in my code,
which was branched from 3.11. Perhaps we should document this suffix (and the
case-insensitivity of "PERCENTILE", "ALWAYS", and "NONE")?
was (Author: jtvaughan):
[~rustyrazorblade], thanks! But is it really case-sensitive? Here's what I
see in {{schema/SpeculativeRetryParam.java}}:
{code:java}
public static SpeculativeRetryParam fromString(String value)
{
// ...
if
(value.toUpperCase(Locale.ENGLISH).endsWith(Kind.PERCENTILE.toString()))
{
// Parse Double value...
}
// ...
}
{code}
Doesn't this handle all case combinations?
I've also tested various combos in cqlsh(1) in my Docker instance:
{noformat}
root@4b8036840324:/# cqlsh
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.11.1 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
cqlsh> create keyspace foo with replication = {'class': 'SimpleStrategy',
'replication_factor': 1};
cqlsh> use foo;
cqlsh:foo> create table bar (id bigint, name text, primary key (id));
cqlsh:foo> alter table bar with speculative_retry= '88percentile';
cqlsh:foo> alter table bar with speculative_retry= '88percentIle';
cqlsh:foo> alter table bar with speculative_retry= '88PeRcEnTiLe';
cqlsh:foo> create table baz (id bigint, name text, primary key (id)) with
speculative_retry = '50pErCeNtIlE';
cqlsh:foo>
{noformat}
There weren't any issues.
I also noticed that the trunk code now accepts a 'P' suffix for "PERCENTILE"
(as of commit {{3fe31ffddb6a57e0ff89a813f724cd74133052db}}). I didn't see that
in my code, which was branched from 3.11. Perhaps we should document this
suffix (and the case-insensitivity of "PERCENTILE", "ALWAYS", and "NONE")?
> document speculative_retry on DDL page
> --------------------------------------
>
> Key: CASSANDRA-13872
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13872
> Project: Cassandra
> Issue Type: Improvement
> Components: Documentation and Website
> Reporter: Jon Haddad
> Assignee: Jordan Vaughan
> Priority: Major
> Labels: docuentation, lhf
> Fix For: 4.0
>
>
> There's no mention of speculative_retry or how it works on
> https://cassandra.apache.org/doc/latest/cql/ddl.html
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]