[
https://issues.apache.org/jira/browse/CASSANDRA-11136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15139940#comment-15139940
]
Pavel Yaskevich commented on CASSANDRA-11136:
---------------------------------------------
All of the changed are pushed into the
[sasi_validation|https://github.com/xedin/cassandra/tree/sasi_validation] branch
bq. Seeing as the CassandraIndex::parseTarget methods are being shared, maybe
they'd be better moved somewhere else. Perhaps an o.a.c.i.TargetParser helper
or similar?.
Moved to TargetParser#parse
bq. While we're there, I don't recall why the original method throws
RuntimeException rather than ConfigurationException. If you agree, do you mind
changing that while you're in the area?
Done
bq. getColumnFamilyStoreIncludingIndexes in SASIIndex::validateOptions is
overkill, it could just use Keyspace::openAndGetStore(cfm)
That's exactly what I did originally but the problem is that
Keyspace::openAndGetStore is going to throw an exception (or assertion) instead
of just returning null when keyspace or cf doesn't exist, which is what happens
in the tests where indexes are being added as part of keyspace creation/init.
That's why I switched to getColumnFamilyStoreIncludingIndexes since it would
just return "null" without freaking out.
bq. Related to the previous: ColumnIndex::validate() doesn't appear to be
called from anywhere, which is currently the only call site of
IndexMode::validate.
Sorry, it was another rudiment of 2.0 which I missed, I've actually removed
ColumnIndex::validate and changed IndexMode validate to "validateAnalyzer"
which is called in SASIndex validate now.
bq. I don't know if this is intentional (for forwards compat) but
unknown/unrecognised options are silently allowed. Personally, I'd prefer the
validation were strict and any unrecognised options resulted in an error.
Yeah, that's intentional because (at least) analyzers are pluggable and we
can't now upfront which options are they going to support.
bq. Very minor: The reformatting of imports in SASIIndex isn't in line with the
Code Style
Fixed, thanks!
bq. It isn't new or specific to this issue, but I noticed there are still some
links in SASI.md which point to your github fork.
Fixed.
> SASI index options validation
> -----------------------------
>
> Key: CASSANDRA-11136
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11136
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Pavel Yaskevich
> Assignee: Pavel Yaskevich
> Fix For: 3.4
>
>
> This is an umbrella issue for CASSANDRA-\{11129, 11132, 11133, 11134\}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)