[bdbxml] Recovering/Verifying a Container
Andrew Wood <[email protected]>
| Newsgroups | gmane.comp.db.dbxml.general |
|---|---|
| Message-ID | <[email protected]> |
Hello
I'm in a bit of a bind. I created a few containers for DBXML for
testing some aspects of the performance of DBXML (which is pretty
amazing I might add) which involved adding indexes and running some
tests on various containers driven from some PHP webservices.
Anyways, I think I bunged one of the containers and I'm not quite sure
how. I added an index on a container with 10^7 pretty straightforward
XML documents and was doing a quick check on the container with the
dbxml shell:
dbxml> listIndexes
Index: node-element-equality-decimal for node {}:account
Index: unique-node-metadata-equality-string for node
{http://www.sleepycat.com/2002/dbxml}:name
2 indexes found.
dbxml>
It's about here that I make a typo and mean to hit Control-W to
correct it when I actually hit Control-C and kill the dbxml shell by
accident. D'oh. So I rerun the dbxml shell and do a listIndexes to
make sure my Index still exists:
dbxml> openContainer sunnyvale_10000000.dbxml
dbxml> listIndexes
Index: unique-node-metadata-equality-string for node
{http://www.sleepycat.com/2002/dbxml}:name
1 indexes found.
Sweet merciful crap. Where did the index on the account element go? I
try adding the index again:
dbxml> addIndex "" account node-element-equality-decimal
Adding index type: node-element-equality-decimal to node: {}:account
page 0: illegal page type or format
PANIC: Invalid argument
stdin:3: addIndex failed, Error: Db::get: DB_RUNRECOVERY: Fatal error,
run database recovery
Uh-oh. So I run the db_verify command:
awood@shuttle:/usr/local/xmldata/containers$ /dbxml/bin/db_verify
sunnyvale_10000000.dbxml
db_verify: Page 6014185: invalid prev_pgno 6128356
db_verify: Page 6026338: invalid next_pgno 6128344
db_verify: Page 6079578: invalid next_pgno 6128355
db_verify: sunnyvale_10000000.dbxml: DB_VERIFY_BAD: Database verification failed
awood@shuttle:/usr/local/xmldata/containers$
In summary I've tried to run db_recover to no avail. Is this a case
where I just have to suck it up and recreate this giant container and
re-add the index?
I guess I just don't get why hitting Control-C after adding the index
messed up the dbxml container. Is this a known behaviour and simply
idiocy on my part?
Thanks for a great tool regardless :)
awood@shuttle:~$ /dbxml/bin/dbxml -V ; /dbxml/bin/db_verify -V ;
/dbxml/bin/db_recover -V ; uname -a
Sleepycat Software: Berkeley DB XML 2.1.8: (May 24, 2005)
Sleepycat Software: Berkeley DB 4.3.28: (April 22, 2005)
Sleepycat Software: Berkeley DB 4.3.28: (April 22, 2005)
Sleepycat Software: Berkeley DB 4.3.28: (April 22, 2005)
Linux shuttle 2.4.29 #6 Thu Jan 20 16:30:37 PST 2005 i686 unknown
unknown GNU/Linux
--
-Andrew
All generalizations, with the possible exception of this one, are false.
- Kurt Godel
------------------------------------------
To remove yourself from this list, send an
email to [email protected]