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

Denis Mekhanikov commented on IGNITE-6572:
------------------------------------------

[~dmagda], yes, I'm talking about {{QueryEntity}}. I had a conversation with 
[~vozerov] about it. Currently we don't have any options how to make multiple 
caches have the same schema. Implementing it in SQL syntax requires major code 
changes and it doesn't have a predictable timeline. At the same time, fixing 
behavior for {{QueryEntity}}-API doesn't require much resources. Currently if 
you create a custom schema, you can only have a single table in it. It is not 
usable at all. I think, we should give users at least some way to use custom 
schema, even though it will be deprecated.

> Allow multiple caches use one SQL schema
> ----------------------------------------
>
>                 Key: IGNITE-6572
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6572
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>            Reporter: Denis Mekhanikov
>              Labels: usability
>             Fix For: 2.4
>
>
> When trying to create more than one cache with the same SQL schema name, the 
> following exception is thrown:
> {noformat}
> Exception in thread "main" class org.apache.ignite.IgniteException: Schema 
> already registered: TEST_SCHEMA
>       at 
> org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:957)
>       at org.apache.ignite.Ignition.start(Ignition.java:350)
>       at 
> org.apache.ignite.examples.repro.schema.SchemaExampleNode.main(SchemaExampleNode.java:7)
> Caused by: class org.apache.ignite.IgniteCheckedException: Schema already 
> registered: TEST_SCHEMA
>       at 
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.registerCache(IgniteH2Indexing.java:2110)
>       at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor.registerCache0(GridQueryProcessor.java:1393)
>       at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor.onCacheStart0(GridQueryProcessor.java:784)
>       at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor.onCacheStart(GridQueryProcessor.java:845)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCache(GridCacheProcessor.java:1185)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.prepareCacheStart(GridCacheProcessor.java:1884)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheProcessor.startCachesOnLocalJoin(GridCacheProcessor.java:1755)
>       at 
> org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:619)
>       at 
> org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1901)
>       at 
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>       at java.lang.Thread.run(Thread.java:748)
> {noformat}
> It should be allowed to share schema between caches. Currently it works for 
> PUBLIC schema only.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to