Hi!
It does look very strange because it has null value for the index name,
and it looks like it does a "x = map.put( indexname, entry)" in the code
and if x is not null (index already exists) you will get that exception,
but if the name of the index is null it's a bit strange that the map
returns a non null value, but maybe I am looking at the wrong place in
the source.
Does this happen every time you do it ? is this code executed just after
you create the cache ? what version of Ignite ?
Have you checked that you did not get any exception when you created
that cache ? the only things I can think of is if the binary marshaller
did complain about your column names, it does not store the names, just
a hash code so in theory you could get a name collision but if that was
the case I think Ignite would complain when you created the cache.
Mikael
Den 2019-01-07 kl. 08:42, skrev Shravya Nethula:
Hi,
I successfully created an Ignite table named User. Now I want to create 3
indexes on id, cityId, age columns in User table. Indexes were successfully
created on id and cityId columns. But I am getting the following "duplicate
index found" error though I am trying to create index for the first time for
age column:
Generated sql : CREATE INDEX ON User (id asc)
Successfully created index on id column
Generated sql : CREATE INDEX ON User (cityId asc)
Successfully created index on cityId column
Generated sql : CREATE INDEX ON User (age asc)
Failed to create index on age column
Invalid schema state (duplicate index found): null
[12:34:52] (err) DDL operation failureSchemaOperationException [code=0,
msg=Invalid schema state (duplicate index found): null]
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.prepareChangeOnNotStartedCache(GridQueryProcessor.java:1104)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.startSchemaChange(GridQueryProcessor.java:627)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.onSchemaPropose(GridQueryProcessor.java:488)
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.processCustomExchangeTask(GridCacheProcessor.java:378)
at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.processCustomTask(GridCachePartitionExchangeManager.java:2475)
at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body0(GridCachePartitionExchangeManager.java:2620)
at
org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:2539)
at
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
at java.lang.Thread.run(Thread.java:748)
javax.cache.CacheException: Invalid schema state (duplicate index found):
null
at
org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.query(IgniteCacheProxyImpl.java:697)
at
org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.query(IgniteCacheProxyImpl.java:636)
at
org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.query(GatewayProtectedCacheProxy.java:388)
at
net.aline.cloudedh.base.database.IgniteTable._createIndex(IgniteTable.java:99)
at
net.aline.cloudedh.base.database.BigTable.createIndex(BigTable.java:234)
at
net.aline.cloudedh.base.database.BigTable.createIndex(BigTable.java:246)
at
net.aline.cloudedh.base.framework.DACEngine.createIndexOnTable(DACEngine.java:502)
at
net.aline.cloudedh.base.framework.DACOperationsTest.main(DACOperationsTest.java:24)
Caused by: class
org.apache.ignite.internal.processors.query.IgniteSQLException: Invalid
schema state (duplicate index found): null
at
org.apache.ignite.internal.processors.query.h2.ddl.DdlStatementsProcessor.convert(DdlStatementsProcessor.java:644)
at
org.apache.ignite.internal.processors.query.h2.ddl.DdlStatementsProcessor.runDdlStatement(DdlStatementsProcessor.java:505)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.doRunPrepared(IgniteH2Indexing.java:2293)
at
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:2209)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2135)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2130)
at
org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2707)
at
org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2144)
at
org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.query(IgniteCacheProxyImpl.java:685)
... 7 more
How can i resolve this issue?
Thanks.
Regards,
Shravya Nethula.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/