cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Tunnicliffe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-11136) SASI index options validation
Date Wed, 10 Feb 2016 21:54:18 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-11136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15141766#comment-15141766
] 

Sam Tunnicliffe commented on CASSANDRA-11136:
---------------------------------------------

The check in {{SASIIndex::validateOptions}} just needs to be tweaked thus:
{code}
diff --git a/src/java/org/apache/cassandra/index/sasi/SASIIndex.java b/src/java/org/apache/cassandra/index/sasi/SASIIndex.java
index b460910..5801b1d 100644
--- a/src/java/org/apache/cassandra/index/sasi/SASIIndex.java
+++ b/src/java/org/apache/cassandra/index/sasi/SASIIndex.java
@@ -146,7 +146,7 @@ public class SASIIndex implements Index, INotificationConsumer
                                                .stream()
                                                .filter((index) -> index.dependsOn(target.left)
                                                                && index.getClass().isAssignableFrom(SASIIndex.class))
-                                               .findFirst().isPresent())
+                                               .count() > 1)
             throw new ConfigurationException("Index on '" + targetColumn + "' already exists,
SASI doesn't support multiple indexes per column.");

         return Collections.emptyMap();
{code}


> 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)

Mime
View raw message