"Couldn't update base file"

3 views
Skip to first unread message

Michael Elsdörfer

unread,
May 12, 2008, 3:40:40 PM5/12/08
to xappy-discuss
I'm trying to use Xappy within a py.test suite, which I am mentioning
only to explain the rather strange usage. I was able to recreate the
problem within a standalone script though, so py.test should not be to
blame.

The code works something like this:

connection = xappy.IndexerConnection(...)
# init some field actions

connection.replace(document_for_id("1"))
connection.flush()

# test search would go here, but not doing that yet

connection.delete("1")
connection.flush()

The last call to flush() gives me:

xapian.DatabaseError: Modifications failed, and cannot set consistent
table revision numbers: Couldn't update base file $TEMP_INDEX_DIR/
postlist.baseA: File exists

Multiple flushes and replace() calls seem to work fine, but as soon as
a delete() (of one of the just added documents) is involved, that
error pops up.

Still using the SVN checkout from March 17th (Xapian retrieved via libs
\get_xapian.py), on Windows.

Richard Boulton

unread,
May 12, 2008, 5:27:42 PM5/12/08
to xappy-...@googlegroups.com
Michael Elsdörfer wrote:
> I'm trying to use Xappy within a py.test suite, which I am mentioning
> only to explain the rather strange usage. I was able to recreate the
> problem within a standalone script though, so py.test should not be to
> blame.

Could you attach a copy of the script you've reproduced it with (either
here, or to a new bug report)? It's much easier to reproduce such
things if I just have a script to run, than if I have to try and follow
a set of steps like those below...

> The code works something like this:
>
> connection = xappy.IndexerConnection(...)
> # init some field actions
>
> connection.replace(document_for_id("1"))
> connection.flush()
>
> # test search would go here, but not doing that yet
>
> connection.delete("1")
> connection.flush()
>
> The last call to flush() gives me:
>
> xapian.DatabaseError: Modifications failed, and cannot set consistent
> table revision numbers: Couldn't update base file $TEMP_INDEX_DIR/
> postlist.baseA: File exists
>
> Multiple flushes and replace() calls seem to work fine, but as soon as
> a delete() (of one of the just added documents) is involved, that
> error pops up.

That's quite an odd error message (in particular, the $TEMP_INDEX_DIR
bit - I don't remember any code which could reasonably generate such a
message - or is that the literal name of your database?).

I've not come across this before, and have just tried unsuccessfully to
reproduce it here. I suspect this is either a Windows specific problem
(I usually work on Linux, but occasionally test on Windows too, and
xappy should work without errors on Windows), or a problem with the
particular xapian snapshot you're using.

Could you write a short test script, along the lines of the comments
above, but which will actually run and produce the error on your
machine? (Include any significant command line parameters you're
passing to the script when you run it). That way, I could be certain
that the difference between your system and mine isn't that I'm not
doing the same actions as you.

Once I've got that, I'll try it out on various systems and see if I can
reproduce it. Once these things are reproduced, it's usually easy to
fix them. :)

--
Richard

Michael Elsdörfer

unread,
May 15, 2008, 5:51:37 PM5/15/08
to xappy-discuss
> Could you attach a copy of the script you've reproduced it with (either
> here, or to a new bug report)? It's much easier to reproduce such
> things if I just have a script to run, than if I have to try and follow
> a set of steps like those below...

The reason I didn't do this already is that I have wrapped up Xappy in
custom code with lots of dependencies. I can indeed not reproduce the
error with a simple standalone script as described above either -
sorry for that. I'll try to come up with a working demo. It suspect it
could possible be related to the field actions I am using.

> That's quite an odd error message (in particular, the $TEMP_INDEX_DIR
> bit - I don't remember any code which could reasonably generate such a
> message - or is that the literal name of your database?).

I just put that there instead of the actual path. I need to try harder
not to complicate things by trying to simplify them ;)

Michael
Reply all
Reply to author
Forward
0 new messages