You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/10/19 17:58:00 UTC
[jira] [Commented] (OFBIZ-13686) Embedded H2 is never closed on shutdown, so committed data can be lost on restart
[ https://issues.apache.org/jira/browse/OFBIZ-13686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18128861#comment-18128861 ]
ASF subversion and git services commented on OFBIZ-13686:
---------------------------------------------------------
Commit 2afd9f164072fc0442895c6c25cd26b080787bd0 in ofbiz-plugins's branch refs/heads/trunk from Mridul Pathak
[ https://gitbox.apache.org/repos/asf?p=ofbiz-plugins.git;h=2afd9f164 ]
Fixed: Stop the Lucene document indexers before OFBiz closes the datasources (OFBIZ-13686)
The new lucene-container stops the document indexers when OFBiz shuts down, waiting at most 3 seconds, so that they are done with the database before the framework closes the datasources. As before, the documents still queued at that point are not indexed; what changes is that an indexer no longer tries to prepare documents from a closed datasource, which failed with errors in the log.
> Embedded H2 is never closed on shutdown, so committed data can be lost on restart
> ---------------------------------------------------------------------------------
>
> Key: OFBIZ-13686
> URL: https://issues.apache.org/jira/browse/OFBIZ-13686
> Project: OFBiz
> Issue Type: Bug
> Components: framework/entity
> Affects Versions: Upcoming Branch
> Reporter: Mridul Pathak
> Assignee: Mridul Pathak
> Priority: Major
>
> Since H2 became the default database (OFBIZ-13412), the H2 URLs use {{DB_CLOSE_ON_EXIT=FALSE}} and nothing else closes the database, so every OFBiz exit, including {{ofbiz --shutdown}}, is an unclean close for H2. After such a close, H2's recovery can revert the database to an older state and silently drop committed data. On trunk, a row imported through webtools was gone after a normal restart, and once the whole database reverted to its schema-only state.
> This affects trunk with the default embedded H2. release24.09 (Derby) and external databases are not affected. Fix: close the H2 datasources cleanly (close the pools or issue {{SHUTDOWN}}) at the end of shutdown, after all containers have stopped.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)