Bug 33148 - Corrupt index files
Summary: Corrupt index files
Alias: None
Product: Xindice
Classification: Unclassified
Component: DB Engine (show other bugs)
Version: cvs head (1.1)
Hardware: PC Windows 2000
: P2 normal
Target Milestone: ---
Assignee: Xindice Developers
Depends on:
Reported: 2005-01-18 13:33 UTC by Eickvonder
Modified: 2007-03-13 20:22 UTC (History)
0 users

index.patch (1.78 KB, patch)
2007-03-09 19:25 UTC, Natalia Shilenkova
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eickvonder 2005-01-18 13:33:57 UTC

I'm using XIndice 1.1b4 (and tried it with current head, too) embedded within a 
webapp in a Tomcat 5 on a jdk 1.4.2 windows system. 
On startup of my application I initialize the database by creating several 
collections and storing some data in them.
The problem is now that if I create a collection first, then create an index 
(or 4 indexes in my case) via the CollectionManager and then store some data 
into that collection, the index is sometimes corrupt. The index is corrupt 
means that I can't search over that index and the index (*.idx) file on the 
filesystem is only 57 bytes large.
If I let my system wait a couple of seconds before I start storing data it is 
all fine.

Bjoern Eickvonder
Comment 1 Natalia Shilenkova 2007-03-09 19:25:10 UTC
Created attachment 19693 [details]

I think problem here happens when main thread tries to add documents to the
index file that hasn't been created yet by Timer thread.
Comment 2 Vadim Gritsenko 2007-03-13 20:22:25 UTC
good catch. thanks for the patch, applied.