[
https://issues.apache.org/jira/browse/IGNITE-26588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Roman Puchkovskiy reassigned IGNITE-26588:
------------------------------------------
Assignee: Roman Puchkovskiy
> Index creation fails after node restart
> ---------------------------------------
>
> Key: IGNITE-26588
> URL: https://issues.apache.org/jira/browse/IGNITE-26588
> Project: Ignite
> Issue Type: Bug
> Reporter: Roman Puchkovskiy
> Assignee: Roman Puchkovskiy
> Priority: Critical
> Labels: ignite-3
>
> The following test
> {code:java}
> class TestTest extends BaseSqlIntegrationTest {
> private static final String ZONE_NAME = "ZONE_TABLE";
> private static final String TABLE_NAME = "TEST_TABLE";
> @Test
> void test() {
> sql(format("CREATE ZONE IF NOT EXISTS {} (REPLICAS {}, PARTITIONS {})
> STORAGE PROFILES ['{}']",
> ZONE_NAME, 1, 1, DEFAULT_STORAGE_PROFILE
> ));
> sql(format(
> "CREATE TABLE {} (i0 INTEGER PRIMARY KEY, i1 INTEGER) ZONE
> {}",
> TABLE_NAME, ZONE_NAME
> ));
> CLUSTER.restartNode(2);
> sql(format("CREATE INDEX idx ON {}(i1)", TABLE_NAME));
> }
> } {code}
> produces the following error in the restarted node logs:
> {noformat}
> Caused by: java.lang.NullPointerException: Cannot invoke
> "org.apache.ignite.internal.table.distributed.PartitionSet.stream()" because
> "partitions" is null
> at
> org.apache.ignite.internal.table.TableImpl.registerSortedIndex(TableImpl.java:296)
> at
> org.apache.ignite.internal.table.distributed.index.IndexUtils.registerIndexToTable(IndexUtils.java:62)
> at
> org.apache.ignite.internal.index.IndexManager.registerIndex(IndexManager.java:308)
> at
> org.apache.ignite.internal.index.IndexManager.lambda$startIndexAsync$9(IndexManager.java:293)
> at
> org.apache.ignite.internal.util.IgniteUtils.inBusyLock(IgniteUtils.java:883)
> at
> org.apache.ignite.internal.index.IndexManager.lambda$startIndexAsync$10(IndexManager.java:292){noformat}
> It seems that localPartsByTableId is not recovered on node start for existing
> tables (at least, when colocation is enabled).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)