dbTalk Databases Forums  

DB_PAGE_NOTFOUND in Tcl

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss DB_PAGE_NOTFOUND in Tcl in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
john@magnatune.com
 
Posts: n/a

Default DB_PAGE_NOTFOUND in Tcl - 04-21-2006 , 10:07 AM






I'm getting DB_PAGE_NOTFOUND on one of my databases, trying to get a
cursor or "stat" on the database. It's still accepting get/put
commands, however.

ie:
DB_PAGE_NOTFOUND: Requested page not found while executing
$dbid stat

I'm assuming this means the database is corrupted? I'm not seeing much
mention of this in the docs, other than as a flag to an environment,
and I'm not using an environment.

-john


Reply With Quote
  #2  
Old   
Michael Cahill
 
Posts: n/a

Default Re: DB_PAGE_NOTFOUND in Tcl - 04-21-2006 , 05:07 PM






Quote:
DB_PAGE_NOTFOUND: Requested page not found while executing
$dbid stat

I'm assuming this means the database is corrupted? I'm not seeing much
mention of this in the docs, other than as a flag to an environment,
and I'm not using an environment.
If you're not using an environment, this problem could also be caused
by using multiple DB handles -- if you do gets/puts on one handle, and
the stat call on another, they won't see a coherent view of the
database pages (that's what an environment cache provides).

Otherwise, you can find out whether the database file is corrupted by
running the db_verify utility -- does it report any errors?

Regards,
Michael.



Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default Re: DB_PAGE_NOTFOUND in Tcl - 04-23-2006 , 08:33 PM



Quote:
Otherwise, you can find out whether the database file is corrupted by
running the db_verify utility -- does it report any errors?
db_verify is reporting a corrupted database:
asin.bdb: DB_VERIFY_BAD: Database verification failed

However, I don't see how to fix a corrupted database.

I've read the docs on db_recover, and don't see how it can be used to
repair an individual database file
(http://www.sleepycat.com/docs/utility/db_recover.html).

I must be misunderstanding the docs, or perhaps there's another way to
fix a corrupted database.

FYI, the corrupted database came about from multithreading in Tcl with
the Berkeley DB tcl api. I know that's bad, but I'm also interested in
seeing what I can do when/if a corrupted database occurs in production
(I'm still in development)

-john



Reply With Quote
  #4  
Old   
AT
 
Posts: n/a

Default Re: DB_PAGE_NOTFOUND in Tcl - 04-25-2006 , 08:11 PM



Quote:
I'm also interested in
seeing what I can do when/if a corrupted database occurs in production
(I'm still in development)
db_dump -r [or -R]
delete/rename the db, then do db_load



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.