Ignite persistent. Schema tables disappeared sometimes

353 Views Asked by At

I have problems with the database based on ignite. Sometimes (I can't catch exact situation) after restart server/os etc, the system started with empty schema (all created tables disappeared)

  1. Environment:

    • Ignite 2.7, 2.7.5
    • OS - macOS 10.14.5
    • java 1.8.0_121, Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
    • it's single node.
  2. jdbc

    jdbc { # Ignite JDBC URL and driver. url = "jdbc:ignite:thin://127.0.0.1/nlpcraft" driver = org.apache.ignite.IgniteJdbcThinDriver # username = # password = }

  3. ignite.xml:

        <property name="sqlSchemas">
            <list>
                <value>nlpcraft</value>
            </list>
        </property>
    
        <property name="dataStorageConfiguration">
            <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
                <property name="defaultDataRegionConfiguration">
                    <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
                        <property name="persistenceEnabled" value="true"/>
                    </bean>
                </property>
            </bean>
        </property>
        ......
    

How can I resolve it? Thank you

1

There are 1 best solutions below

2
dmagda On

Turns out that the files were written to a temporary folder of the file system and removed upon nodes restart. We updated Ignite documentation:

  • Ensure that WARN logging level is not disabled for Ignite. You will see a warning if the persistence files are written to the temporary directory.
  • Change the location of all persistence files using the APIs of DataStorageConfiguration such as setStoragePath(...), setWalPath(...) and setWalArchivePath(...).

Thanks for helping to pinpoint the issue. We'll go ahead and see how Ignite can handle this automatically.