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 |