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

RocksDb: NPE on index creation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Invalid
    • 3.0
    • None
    • persistence

    Description

      Steps to reproduce:

      1. Start a single 1-node cluster of AI3
      2. Create a table in RocksDB storage:

      create zone if not exists "ROCKSDB" with storage_profiles='default_rocksdb';
      create table table_8214(id INTEGER not null, int_field_1 INTEGER not null, str_field_1 VARCHAR(50) not null, primary key (id)) with PRIMARY_ZONE='ROCKSDB';
      

      3. Try to create an index on this table:

      create index temp on table_8214 using SORTED (int_field_1);
      

      Expected result: an index is created successfully (the same actions work on ai3persist).
      Actual result: index not created, no response from server to client (query hangs), NPE in AI3 log:

      2024-05-06 05:02:51:943 +0000 [WARNING][%IndexTests_cluster_0%tableManager-io-0][CatalogManagerImpl] Failed to apply catalog update.
      java.util.concurrent.CompletionException: java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "pk" is null
      	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332)
      	at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:674)
      	at java.base/java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:662)
      	at java.base/java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:2168)
      	at org.apache.ignite.internal.table.distributed.TableManager.onTableCreate(TableManager.java:693)
      	at org.apache.ignite.internal.table.distributed.TableManager.lambda$startAsync$2(TableManager.java:614)
      	at org.apache.ignite.internal.event.AbstractEventProducer.fireEvent(AbstractEventProducer.java:88)
      	at org.apache.ignite.internal.catalog.CatalogManagerImpl.access$000(CatalogManagerImpl.java:91)
      	at org.apache.ignite.internal.catalog.CatalogManagerImpl$OnUpdateHandlerImpl.handle(CatalogManagerImpl.java:562)
      	at org.apache.ignite.internal.catalog.CatalogManagerImpl$OnUpdateHandlerImpl.handle(CatalogManagerImpl.java:529)
      	at org.apache.ignite.internal.catalog.storage.UpdateLogImpl$UpdateListener.onUpdate(UpdateLogImpl.java:314)
      	at org.apache.ignite.internal.metastorage.server.Watch.onUpdate(Watch.java:67)
      	at org.apache.ignite.internal.metastorage.server.WatchProcessor.notifyWatches(WatchProcessor.java:233)
      	at org.apache.ignite.internal.metastorage.server.WatchProcessor.lambda$notifyWatches$3(WatchProcessor.java:181)
      	at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
      	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      	at java.base/java.lang.Thread.run(Thread.java:833)
      Caused by: java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "pk" is null
      	at java.base/java.util.ImmutableCollections$MapN.probe(ImmutableCollections.java:1321)
      	at java.base/java.util.ImmutableCollections$MapN.get(ImmutableCollections.java:1235)
      	at org.apache.ignite.internal.storage.DataStorageManager.engineByStorageProfile(DataStorageManager.java:91)
      	at org.apache.ignite.internal.table.distributed.TableManager.createTableStorage(TableManager.java:1452)
      	at org.apache.ignite.internal.table.distributed.TableManager.createTableLocally(TableManager.java:1315)
      	at org.apache.ignite.internal.table.distributed.TableManager.lambda$createTableLocally$50(TableManager.java:1283)
      	at org.apache.ignite.internal.util.IgniteUtils.inBusyLockAsync(IgniteUtils.java:890)
      	at org.apache.ignite.internal.table.distributed.TableManager.createTableLocally(TableManager.java:1267)
      	at org.apache.ignite.internal.table.distributed.TableManager.onTableCreate(TableManager.java:692)
      	... 14 more
      2024-05-06 05:02:51:945 +0000 [ERROR][%IndexTests_cluster_0%tableManager-io-0][FailureProcessor] Critical system error detected. Will be handled accordingly to configured handler [hnd=NoOpFailureHandler [], failureCtx=FailureContext [type=CRITICAL_ERROR, err=java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "pk" is null]]
      java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "pk" is null
      	at java.base/java.util.ImmutableCollections$MapN.probe(ImmutableCollections.java:1321)
      	at java.base/java.util.ImmutableCollections$MapN.get(ImmutableCollections.java:1235)
      	at org.apache.ignite.internal.storage.DataStorageManager.engineByStorageProfile(DataStorageManager.java:91)
      	at org.apache.ignite.internal.table.distributed.TableManager.createTableStorage(TableManager.java:1452)
      	at org.apache.ignite.internal.table.distributed.TableManager.createTableLocally(TableManager.java:1315)
      	at org.apache.ignite.internal.table.distributed.TableManager.lambda$createTableLocally$50(TableManager.java:1283)
      	at org.apache.ignite.internal.util.IgniteUtils.inBusyLockAsync(IgniteUtils.java:890)
      	at org.apache.ignite.internal.table.distributed.TableManager.createTableLocally(TableManager.java:1267)
      	at org.apache.ignite.internal.table.distributed.TableManager.onTableCreate(TableManager.java:692)
      	at org.apache.ignite.internal.table.distributed.TableManager.lambda$startAsync$2(TableManager.java:614)
      	at org.apache.ignite.internal.event.AbstractEventProducer.fireEvent(AbstractEventProducer.java:88)
      	at org.apache.ignite.internal.catalog.CatalogManagerImpl.access$000(CatalogManagerImpl.java:91)
      	at org.apache.ignite.internal.catalog.CatalogManagerImpl$OnUpdateHandlerImpl.handle(CatalogManagerImpl.java:562)
      	at org.apache.ignite.internal.catalog.CatalogManagerImpl$OnUpdateHandlerImpl.handle(CatalogManagerImpl.java:529)
      	at org.apache.ignite.internal.catalog.storage.UpdateLogImpl$UpdateListener.onUpdate(UpdateLogImpl.java:314)
      	at org.apache.ignite.internal.metastorage.server.Watch.onUpdate(Watch.java:67)
      	at org.apache.ignite.internal.metastorage.server.WatchProcessor.notifyWatches(WatchProcessor.java:233)
      	at org.apache.ignite.internal.metastorage.server.WatchProcessor.lambda$notifyWatches$3(WatchProcessor.java:181)
      	at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
      	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      	at java.base/java.lang.Thread.run(Thread.java:833)
      

      Found on commit 654a11a4a00919ce2b3ff4ca0e59e83377124dea (recent AI3 at the time).

      Attachments

        Issue Links

          Activity

            People

              ktkalenko@gridgain.com Kirill Tkalenko
              akhitrin Andrey Khitrin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: