[pybsddb] BDB Indexing and Joined Cursor issue

phu kungphu at gmail.com
Tue Oct 21 03:11:29 CEST 2008


A workaround (which I had to use) is to ensure that any cursor you're going
to join has at least one result (via count(), I think it was), only join
those that do, and be sure to test for the case of having no such cursors.

On Mon, Oct 20, 2008 at 7:57 PM, Sury Soni <ssoni at nextdigital.com> wrote:

>  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 0*433 661 327
> ssoni at nextdigital.com
> 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.
>
>
>
> _______________________________________________
> pybsddb mailing list
> pybsddb at argo.es
> http://mailman.argo.es/listinfo/pybsddb
> http://www.argo.es/~jcea/programacion/pybsddb.htm<http://www.argo.es/%7Ejcea/programacion/pybsddb.htm>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jcea.es/pipermail/pybsddb/attachments/20081020/72ca97b5/attachment.htm>


More information about the pybsddb mailing list