dbTalk Databases Forums  

database corruption

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


Discuss database corruption in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rachel Willmer
 
Posts: n/a

Default database corruption - 08-09-2006 , 10:43 AM






I'm debugging a program which uses 2 BDB dbs, and am getting an
occasional corruption.

Here's the scenario:

1 process receives updates to the dbs, and opens it with a write lock

Other processes open them read-only.

The call to open it looks like this: (cut and pasted from various parts
of the code)

db(instance->get_env(),0);
r=db.set_flags(0);
db_open(db,path,oflags); // oflags=DB_CREATE|DB_EXCL in the writer,
DB_RDONLY in the readers)

One db is of type HASH and the other of type BTREE.

When the corruption has happened, it seems that both have been
corrupted. I get "unreferenced page" errors on the HASH db and
"out-of-order key" errors on the BTREE one. when I run db_verify.

So I'd welcome any suggestions about what would be causing this, or how
I go about tracking down the source of the corruption. At the moment,
it's not very repeatable but it does happen after a week or so.

It's db_cxx 4.2 on debian Linux 3.4 (64bit)

Rachel


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.