You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by Jim Wissner <ji...@jbrix.org> on 2003/03/12 01:55:32 UTC
Btree corruption handling question
Hello,
I've been working with Xindice on and off since last year on a couple
different projects, both server-side and client side (embedded in
application). As I've mentioned before, I think it's an impressive piece
of work, and have been trying to evangelize as fit.
Anyway, I'm now working more closely with some of the internals of Xindice,
specifically BTreeFiler and ValueIndexer, as the core for some more finely
tuned app-specific db needs (independent from the primary Xindice database
files).
It all seems to work quite fantastically, except that it doesn't appear to
be too fault tolerant. The code must be solid enough to work in a fairly
volatile environment where crashes/full disks/etc may be anticipated.
What I'm experiencing is that when these things happen, quite often the
BTree (BTreeFiler, ValueIndexer) files leave themselves in a corrupted
state. It's generally apparent when just trying to read back from the
file, throwing an exception at the end of
BTree.query(IndexQuery,BTreeCallback), under "No Query - Just Walk The
Tree", where the Invalid Page Type exception is thrown.
The question is - is there something specific this is indicating as to the
cause of corruption, and more generally, how does the larger Xindice system
account for such corruption? Could anyone point me towards the right place
in the xindice source tree, or even give some pseudo-code, as to what a
good strategy for handling and recovering from such corruption would be?
Many, many thanks in advance..
Jim
--
jim@jbrix.org
Visit www.jbrix.org for:
+ SpeedJAVA jEdit Code Completion Plugin
+ Xybrix XML Application Framework
+ other great Open Source Software