Getting EOF when using get_data() in a remote database
|Reported by:||German M. Bravo||Owned by:||Olly Betts|
I'm getting these exceptions when using get_data() in a remote chert database... in 1.2.18 and trunk (1.3.1):
Some times (most of the time):
xapian.NetworkError: Received EOF (context: remote:tcp(localhost:8900))
Some times (not so often):
xapian.DatabaseCorruptError: REMOTE:find_entry failed to find any entry at all! (context: remote:tcp(localhost:8900))
Other times, it works as expected. In Brass, it seems to work always.
I have been able to reproduce this only when using the remote database, however, this seems like a lower level bug (in the chert backend).
This happens when you have two databases open, one for writing, one for reading. Then, doing a read query in the read database to get a document's
get_data(). Then writing something in the write database, doing commit. Then doing the read query again in the read database (
Create a blank new Chert database, launching:
xapian-tcpsrv --timeout=0 --port=8900 --writable bug in an empty directory.
Then run the attached file:
python bug.py, you should receive an exception:
xapian.NetworkError: Received EOF (context: remote:tcp(localhost:8900)), if not, try running
python bug.py a few times.
Problem with the EOF is that when
ChertCursor::get_key() is called,
Key::read() tries to assign
(p + K1) with a
Key::length() that is returned as
Change History (21)
comment:5 by , 7 years ago
|Component:||Other → Backend-Chert|
|Milestone:||1.3.2 → 1.3.3|