Bug 28783 - dirty flag in Configuration does not work properly
Summary: dirty flag in Configuration does not work properly
Alias: None
Product: Xindice
Classification: Unclassified
Component: DB Engine (show other bugs)
Version: cvs head (1.1)
Hardware: PC All
: P3 major
Target Milestone: ---
Assignee: Xindice Developers
: 31622 33441 38179 (view as bug list)
Depends on:
Reported: 2004-05-05 14:21 UTC by Eickvonder
Modified: 2006-01-09 07:50 UTC (History)
3 users (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Eickvonder 2004-05-05 14:21:38 UTC
I got a java application creates the following Collection structure:


by calling the following code

Collection col = org.xmldb.api.DatabaseManager.getCollection(m_dbURL + path);
if(col.getChildCollection(name) != null) return;
CollectionManagementService service = (CollectionManagementService 
col.getService("CollectionManagementService", "1.0");

three times such that on the first run '/opt', then '/opt/tests' and 
finally '/opt/tests/test5' is being created.
The problem that occurs since 1.1b4 is that though all corresponding directories
in the file system are being created, only the 'opt' Collection is added to 
the 'database.xml' file under '/system/SysConfig'.
If I then run my application a second time the 'tests' Collection is added and 
on a third run 'test5' is created.

I have also looked for a possible reason for this bug and I found out that 
within the 'flushConfig' method in 'org.apache.xindice.core.Database' the call 
for 'getConfig().isDirty()' only returns true one time, after that it is false 
and so the changes of the configuration are not written down.

I marked this as a major bug as this misbehaviour first of all results 
sometimes in a loss of data and secondary 'xmldbgui' does not display these 
collections (which are created in the filesystem, but not added 
to 'database.xml') any more.

My current workaround is to set the if-statement within 'flushConfig' to always 
true, but as this is obviously not the best way, it would be nice if someone 
could look for the real cause.


Björn Eickvonder
Comment 1 Vadim Gritsenko 2004-05-19 20:52:14 UTC
Assign to the list.
Comment 2 Vadim Gritsenko 2004-05-19 20:52:54 UTC
This bug has been fixed in the Xindice CVS. Please check and report if any problem.
Comment 3 Eickvonder 2004-05-21 10:10:35 UTC
Thank you, seems to work now. Sorry for not having assigned the bug to the 
list, I simply left it blank so it was automatically assigned, next time I will 
assign bugs to the list directly.
Comment 4 Vadim Gritsenko 2004-05-21 12:49:48 UTC
Don't worry about assigning bug, bugzilla config has been changed.
Comment 5 Vadim Gritsenko 2004-10-30 13:28:15 UTC
*** Bug 31622 has been marked as a duplicate of this bug. ***
Comment 6 Vadim Gritsenko 2005-02-15 00:38:06 UTC
*** Bug 33441 has been marked as a duplicate of this bug. ***
Comment 7 Vadim Gritsenko 2006-01-09 16:50:10 UTC
*** Bug 38179 has been marked as a duplicate of this bug. ***