On Tue, May 13, 2008 at 03:44:06PM +0400, Anthony Pankov wrote: > If concurrency is the only problem then: > 1. ?an data corruption be avoided? Or this is impossible? > 2. How?
Use Sleepycat/Oracle DB instead? The libc DB1.x, despite being "mature", really should be deprecated in some manner. I'm sure there are others I've forgotten, but the only thing I can think of in the base system which relies on DB1.x is sendmail (which IMHO should really be removed from the base system and replaced with a small standalone mailer -- but that's been discussed in a previous thread in the past). Even "simple" ports like postgrey pull in db41, even though they could technically "work fine" with DB1.x. > If all BDB readers would use O_SHLOCK and all writers O_EXLOCK is it > guarantee for data integrity? The corruption I've seen in the past results in DB operations failing for no particular reason ("what do you mean those are all the records? No! I just inserted a bunch more!"). It turns out some of the data in the actual .db file is corrupt -- even when locking is used everywhere. It's as if the code has some weird bug where it'll write bogus data to the file for some reason. I'll ask you this: is there some particular reason you can't just write to a file yourself, using your own/documented file format? Why does DB have to be used? -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"