Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Berkely DB > inconsistent be...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 1784 of 1800
Post > Topic >>

inconsistent behavior using DB_NO_SYNC on close with queues and

by DavidYoakley <david.yoakley@[EMAIL PROTECTED] > Jan 24, 2008 at 04:43 PM

My application has a feature that requires resetting the contents of
several of its DB_QUEUE databases.  I thought a reasonable way to do
this was to 1) close each queue with a DB_NO_SYNC flag and 2) reopen
with DB_TRUNCATE.  The reason I wanted to close with DB_NO_SYNC is
avoid the time it takes to sync the database to file with data that is
no longer needed.   After a reset done in the fa****on the database
becomes unreliable sometimes losing records that were inserted.  I've
narrowed this down to a simple test case and it is reproducible.  If I
don't use shared cache or if I don't use DB_NO_SYNC the database works
reliably but the combination of these two leads to runtime trouble.  I
suspect the shared cache gets confused in some way that causes it to
stays confused even AFTER the database file is reopened again from
scratch!

Does anyone have a better way of quickly resetting a berkeley DB_QUEUE
database?  I can't readily wipe the whole environment because only a
subset of the db files in the env need to get reset and yet they all
share the env cache.  In fact I really don't want to muck with the
cache because there is another db using the same cache that has gobs
of data in the cache that I don't want to have to reload.  I'm stuck!
 




 2 Posts in Topic:
inconsistent behavior using DB_NO_SYNC on close with queues and
DavidYoakley <david.yo  2008-01-24 16:43:38 
Re: inconsistent behavior using DB_NO_SYNC on close with queues
DavidYoakley <david.yo  2008-01-24 16:56:36 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 6 16:34:56 CDT 2008.