[Xapian-discuss] Exception: Key too long
Markus Wörle
mrks at mrks.de
Thu Sep 28 20:02:25 BST 2006
Am 28.09.2006 um 17:30 schrieb Markus Wörle:
> Hi!
>
> I trying to add a large amount of documents to a database. After about
> 33400 documents I get the following exception for each new document:
>
> Key too long: length was 254 bytes, maximum length of a key is
> BTREE_MAX_KEY_LEN
I found the problem in my code. It was hard to find because this error
seems not to occur until a flush on the disk, and the error message
contains no reference to the key where it fails. I patched my libxapian
more verbose and got it, finally.
It seems that xapian does not detect the error until it flushes on
disk, and if it does, and it fails, it seems that it keeps the
unflushed erroring content in memory. After adding a new valid
document, it notes that its still over the i-should-flush-now
threshold, and tries to flush again, and errors again, and so on...
Hope this helps anyone out there (so my question has not been totally
useless ;-)
Regards,
mrks
More information about the Xapian-discuss
mailing list