1

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

7
  • Can you provide node logs from the run where tables disappear?
    – alamar
    Jul 9, 2019 at 11:52
  • which log level should be used for "org.apache.ignite"?
    – Sergey K
    Jul 9, 2019 at 12:11
  • INFO should be sufficient!
    – alamar
    Jul 9, 2019 at 12:14
  • Is it possible that you've lost your persistence directory somehow? Maybe you mount a disk via network (something like NAS) or run your node as a docker image without proper file system mappings? Jul 9, 2019 at 12:29
  • 3
    Resolved. Thank you for your help! 1) my Ignite log level was ERROR, so I skipped useful warning Persistence store directory is in the temp directory and may be cleaned... (see DataStorageConfiguration#walPath, #walArchivePath, #storagePath properties)... 2) Now I have configured these 3 properties as absolute paths and hope it is solution (relative paths don't work, I have same WARN message) I agree that it was not best idea to turn off Ignite logs, but I think better to include such important info to DataStorageConfiguration javadoc and comments of configuration examples.
    – Sergey K
    Jul 10, 2019 at 10:29

1 Answer 1

2

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.

2
  • 1
    Why not use the current user's home folder and have .ignite folder there? Why do we use self-cleaned temp folders to begin with? Jul 10, 2019 at 19:31
  • Have no idea why temp is not filtered out by default. It will be reconsidered in the upcoming versions.
    – dmagda
    Jul 11, 2019 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.