Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-6572

Allow multiple caches use one SQL schema

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.4
    • sql

    Description

      When trying to create more than one cache with the same SQL schema name, the following exception is thrown:

      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)
      

      It should be allowed to share schema between caches. Currently it works for PUBLIC schema only.

      Attachments

        Activity

          People

            dmekhanikov Denis Mekhanikov
            dmekhanikov Denis Mekhanikov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: