Thanks for the reply. I do not believe that the application is used in a setup with cloud-share by our customer. The devices are used in an environemnt where it is not guaranteed to even have internet connectivity all the time. But I will ask them to make sure.
I do not believe that this can be caused by HA-JDBC choosing the wrong file. As touched on in the "Notes" section we have custom code that compares both databases' content before we start the cluster. This includes compariong the amount of rows in each table as well as equality of each individual row. If we would detect any difference in content we wouldn't add the mirror database to the cluster, running with only the master database. A similar situation would require that HA-JDBC stopped writing to the master database midway during the last run of our application and only wrote to the mirror. But I would assume that a failed write operation would result in a database exception from either the cluster or H2. We have a listener attached to the cluster that should be informed about all exceptions. If an exception happens, this listener will remove the databases from the cluster, check them and only reattach them if they are successfully tested. We do not see such a behavior happening in the logfiles. So this scenario would only be possible if neither HA-JDBC nor H2 realized that the write operation failed or if the exception was caught in a way that neither the transaction nor the listener knew about it. Noel Grandin schrieb am Donnerstag, 4. Mai 2023 um 15:25:29 UTC+2: > > > On 5/3/2023 3:10 PM, Christian Dirks wrote: > > We are running a java application using embedded H2 databases and ran > into data loss situation that we can not explain. > > It appears as if the database reverted to a previous state - or that > data wasn't written to file for hours. > > > > Given the lengths of time involved, my first guess would be some kind of > cloud-sync service that is getting confused and > reverting parts of the filesystem to a prior state. > > My second guess would be that HA-JDBC is doing something weird like > directing writes to one file and not the other, and > then choosing the wrong file the next time the software starts up. > > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/e44e03f3-1834-4455-9480-f2a3f6ecd6a3n%40googlegroups.com.
