[pybsddb] BDB Indexing and Joined Cursor issue

Sury Soni ssoni at nextdigital.com
Tue Oct 21 02:57:40 CEST 2008


Hi All,

 

I am having issue in using joined cursor for indexed database.

 

When, there are no records for given joined cursor, ideally,
jonedCursor.get(0) should return None or raise some exception.

 

But, in my case, I am getting 

 

(-30975, 'DB_RUNRECOVERY: Fatal error, run database recovery -- PANIC:
Invalid argument')

Traceback (most recent call last):

  File "dbNode.py", line 71, in next

    data = self.joinedCursor.get(0)

 

Later, 

 

Exception in destroy:  (-30975, 'DB_RUNRECOVERY: Fatal error, run
database recovery -- PANIC: fatal region error detected; run recovery')

Traceback (most recent call last):

  File "dbNode.py", line 91, in destroy

    self.joinedCursor.close()

 

Is there any quick fix solution I can do?

 

If these exceptions are getting raised due to some other replication
related issue, there is no mechanism I can get that error code and
handle the error accordingly.

 

When I look into the source code, I can see following comments around
this join function wrapper API.

 

    /* FIXME: this is a buggy interface.  The returned cursor

       contains internal references to the passed in cursors

       but does not hold python references to them or prevent

       them from being closed prematurely.  This can cause

       python to crash when things are done in the wrong order. */

____________________________________
Sury Prakash Soni
Developer
____________________________________

Next Digital
Level 8, 15 William St, Melbourne 
VIC 3000 Australia
p +61 3 8612 6888
f  +61 3 8612 6899
m 0433 661 327
ssoni at nextdigital.com <mailto:ssoni at nextdigital.com> 
www.nextdigital.com <http://www.nextdigital.com/> 
____________________________________

This email and any attachments are intended only for the use of the
recipient and may be confidential and/or legally privileged. Next
Digital Group Pty Ltd ("Next Digital") disclaims liability for any
errors, omissions, viruses, loss and/or damage arising from using,
opening or transmitting this email. If you are not the intended
recipient you must not use, interfere with, disclose, copy or retain
this email and you should notify the sender immediately by return email
or by contacting Next Digital by telephone on +61 3 8612 6888.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jcea.es/pipermail/pybsddb/attachments/20081021/2ca58b91/attachment.htm>


More information about the pybsddb mailing list