1

I have stargate 1.0.38 running fine in my DEV server. I am able to use stargate rest api to get auth_token and running insert, select queries.

Yesterday, I have created an index Cql3SolrSecondaryIndex for a table in my Cassandra DSE 6.8. Then I see bellow error in stargate log. After that, I dropped that index. But even after dropping the index, i still see bellow error in stargate log. I also try to stop/start stargate but the still see same error.

ERROR [MigrationStage:1] 2021-10-15 00:47:13,593 PullRequestScheduler.java:245 - Configuration exception merging remote schema
org.apache.cassandra.exceptions.ConfigurationException: Unable to find custom indexer class 'com.datastax.bdp.search.solr.Cql3SolrSecondaryIndex'
        at org.apache.cassandra.utils.FBUtilities.classForName(FBUtilities.java:493)
        at org.apache.cassandra.schema.IndexMetadata.getCustomIndexClass(IndexMetadata.java:190)
        at org.apache.cassandra.schema.IndexMetadata.validate(IndexMetadata.java:131)
        at org.apache.cassandra.schema.Indexes.lambda$validate$2(Indexes.java:168)
        at java.lang.Iterable.forEach(Iterable.java:75)
        at org.apache.cassandra.schema.Indexes.validate(Indexes.java:168)
        at org.apache.cassandra.schema.TableMetadata.validate(TableMetadata.java:512)
        at java.lang.Iterable.forEach(Iterable.java:75)
        at org.apache.cassandra.schema.KeyspaceMetadata.validate(KeyspaceMetadata.java:112)
        at org.apache.cassandra.schema.KeyspaceMetadata.<init>(KeyspaceMetadata.java:85)
        at org.apache.cassandra.schema.KeyspaceMetadata.create(KeyspaceMetadata.java:167)
        at org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspace(SchemaKeyspace.java:1154)
        at org.apache.cassandra.schema.SchemaKeyspace.fetchKeyspaces(SchemaKeyspace.java:1769)
        at org.apache.cassandra.schema.SchemaManager.merge(SchemaManager.java:893)
        at org.apache.cassandra.schema.SchemaManager.mergeAndAnnounceVersion(SchemaManager.java:877)
        at org.apache.cassandra.schema.PullRequestScheduler.lambda$sendPullRequest$2(PullRequestScheduler.java:240)
        at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774)
        at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750)
        at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:456)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.apache.cassandra.concurrent.NamedThreadFactory.lambda$threadLocalDeallocator$0(NamedThreadFactory.java:88)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.lang.Thread.run(Thread.java:748)
        at org.apache.cassandra.utils.concurrent.InlinedThreadLocalThread.run(InlinedThreadLocalThread.java:251)
Caused by: java.lang.ClassNotFoundException: com.datastax.bdp.search.solr.Cql3SolrSecondaryIndex not found by io.stargate.db.dse [1]
        at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1597)
        at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79)
        at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1982)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at org.apache.cassandra.utils.FBUtilities.classForName(FBUtilities.java:489)
        ... 24 common frames omitted

Because of this error, I am still able to get auth_token but all the select queries get this error

{
    "description": "Resource not found: keyspace 'test' not found",
    "code": 404
}

Please help me to fix this issue.

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23
David
  • 3,538
  • 9
  • 39
  • 50

2 Answers2

1

Stargate does not currently support advanced workloads like Search and Graph. I think you might have to drop and recreate that keyspace without the Solr index for it to work again since the schema still exists on the other nodes.

This issue has been documented here. There has also been a request made to support Solr here.

dwettlaufer
  • 378
  • 1
  • 5
  • Thanks for your answer. If I use nodetool to compact my keyspace on all nodes. Does that also fix the problem? – David Oct 15 '21 at 04:15
  • I’ve never tried but it’s worth a shot. Would be interested to hear if it works for you. – dwettlaufer Oct 15 '21 at 05:15
  • I have tried to remove the key space and create a new one ( same name) but still see the same error. – David Oct 16 '21 at 03:48
  • Although Stargate will still not support using Solr indexes at this time, [this PR](https://github.com/stargate/stargate/pull/1354) will make it able to at least work with schemas that include those indexes. – dwettlaufer Oct 22 '21 at 16:51
0

@David, I was able to drop the DSE Search index, perform a rolling restart of my DSE node(s) and then Stargate node(s) and it started up just fine without any errors. I ensure all my prior data existed just fine and was able to validate running basic CRUD operations using Stargate REST, GraphQL & Document APIs without any issues post that.

Madhavan
  • 758
  • 4
  • 8