dbTalk Databases Forums  

Re: hash keys that hide from iterator

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


Discuss Re: hash keys that hide from iterator in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Todd R. Eigenschink
 
Posts: n/a

Default Re: hash keys that hide from iterator - 08-25-2003 , 07:29 PM






Paul.Marquess (AT) btinternet (DOT) com (Paul Marquess) writes:
Quote:
When you said that you could see the "missing" data if you accessed it
directly, but couldn't when you are iterating through the database,
the old duplicate keys issue immediately sprang to mind. Have you
created the database to allow duplicate keys? See the section
"Handling Duplicate Keys" in the DB_File documentation if you have.
No. No dupes. (It wasn't created that way, nor do I want them.)


Quote:
Can you try using this as the loop for your dbdump and see if it makes
any difference?

for ($status = $db->seq($k, $v, R_FIRST) ;
$status == 0 ;
$status = $db->seq($k, $v, R_NEXT) )
{ print "$k: $v\n" }

warn "Status is $status, errno is $!\n";
rtfm 19:17:43 eigenstr > perl test.pl | grep 65.57.172.0/24
Status is -30982, errno is No such file or directory

It printed the smaller number of lines (115838), same as the regular
each %hash, and the thing I was looking for wasn't in the output.


Quote:
Next, if you have db_verify available, can you run it against
blacklist.db?
Aha.

sol 19:20:39 eigenstr > db_verify blacklist.db
db_verify: Hash page 4889 has bad prev_pgno
db_verify: DB->verify: blacklist.db: DB_VERIFY_BAD: Database verification failed

Quote:
If you don't do any locking at all, then the term "asking for trouble"
immediately springs to mind :-)
There are outside measures that should be keeping simultaneous updates
from happening, but if this is likely the result of two updates
happening at the same time, that mechanism is probably broken in some
subtle and hard-to-find way. This problem could have happened months
ago...or it could have just happened yesterday. (If direct lookups
had failed to find things, I would have noticed right away; the
iteration stuff is of low importance.)


Todd


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.