[ https://issues.apache.org/jira/browse/IGNITE-24212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vladimir Steshin updated IGNITE-24212: -------------------------------------- Description: *Consider:* 1) There is a working non-persistent cluster with predefined caches in _IgniteConfiguration_. 2) The caches have no SQL-entities set. 3) A node creates a table over one of those cache with `_CREATE TABLE IF NOT EXISTS_`. A SQL table and a schema appear in the cluster. 4) One of the nodes restarts. 5) Next `_SELECT_` queries to the table may fail with '_TABLE NOT FOUND'_ 6) Restarted node has no tables in system view '_TABLES_'. *Cause:* The node restarts with predefined cache configuration having no SQL entities set. When node joins cluster, dynamic tables/schema seem not merged or validated. The restarting node takes the predefined cache configuration as is without receiving the dynamically created schema and table . +This works+ with the persistence because node stores and reads the cache meta holding the schema/entities. *Workarounds:* 1) Do not predefine caches, create them with `_CREATE TABLE_` 2) Set matching SQL entities in the predefined cache config. 3) Use other cache names with `_CREATE TABLE_` (_WITH "CACHE_NAME=._..). *Suggestions:* 1) Validate schema/caches and do not allow node join cluster. or 2) Merge static and dynamic schemas/cache configs and send them to the joining node. was: Consider: 1) There is a working non-persistent cluster with predefined caches in _IgniteConfiguration_. 2) The caches have no SQL-entities set. 3) A node creates a table over one of those cache with `_CREATE TABLE IF NOT EXISTS_`. A SQL table and a schema appear in the cluster. 4) One of the nodes restarts. 5) Next `_SELECT_` queries to the table may fail with '_TABLE NOT FOUND'_ 6) Restarted node has no tables in system view '_TABLES_'. Cause: The node restarts with predefined cache configuration having no SQL entities set. When node joins cluster, dynamic tables/schema seem not merged or validated. The restarting node takes the predefined cache configuration as is without receiving the dynamically created schema and table . This works with the persistence because node stores and reads the cache meta holding the schema/entities. Workarounds: 1) Do not predefine caches, create them with `_CREATE TABLE_` 2) Set matching SQL entities in the predefined cache config. 3) Use other cache names with `_CREATE TABLE_` (_WITH "CACHE_NAME=._..). Suggestions: 1) Validate schema/caches and do not allow node join cluster. or 2) Merge static and dynamic schemas/cache configs and send them to the joining node. > Non-persistent SQL schema isn't merged or validated when node rejoins > --------------------------------------------------------------------- > > Key: IGNITE-24212 > URL: https://issues.apache.org/jira/browse/IGNITE-24212 > Project: Ignite > Issue Type: Bug > Reporter: Vladimir Steshin > Priority: Minor > > *Consider:* > 1) There is a working non-persistent cluster with predefined caches in > _IgniteConfiguration_. > 2) The caches have no SQL-entities set. > 3) A node creates a table over one of those cache with `_CREATE TABLE IF NOT > EXISTS_`. A SQL table and a schema appear in the cluster. > 4) One of the nodes restarts. > 5) Next `_SELECT_` queries to the table may fail with '_TABLE NOT FOUND'_ > 6) Restarted node has no tables in system view '_TABLES_'. > *Cause:* > The node restarts with predefined cache configuration having no SQL entities > set. When node joins cluster, dynamic tables/schema seem not merged or > validated. The restarting node takes the predefined cache configuration as is > without receiving the dynamically created schema and table . > +This works+ with the persistence because node stores and reads the cache > meta holding the schema/entities. > *Workarounds:* > 1) Do not predefine caches, create them with `_CREATE TABLE_` > 2) Set matching SQL entities in the predefined cache config. > 3) Use other cache names with `_CREATE TABLE_` (_WITH "CACHE_NAME=._..). > *Suggestions:* > 1) Validate schema/caches and do not allow node join cluster. > or > 2) Merge static and dynamic schemas/cache configs and send them to the > joining node. -- This message was sent by Atlassian Jira (v8.20.10#820010)