Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Nov 2004 22:11:08 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        David Gilbert <dgilbert@dclg.ca>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Snapshot corruption.
Message-ID:  <20041123041107.GC48882@dan.emsphone.com>
In-Reply-To: <16802.46241.989001.30646@canoe.dclg.ca>
References:  <16795.43373.413946.559615@canoe.dclg.ca> <419BB453.70205@elischer.org> <16795.46413.508033.379777@canoe.dclg.ca> <20041122232817.GA1473@green.homeunix.org> <16802.46241.989001.30646@canoe.dclg.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Nov 22), David Gilbert said:
> >>>>> "Brian" == Brian Fundakowski Feldman <green@freebsd.org> writes:
> Brian> Long strings of NUL bytes?  Missing data?  Spam (from the same
> Brian> file, or from other files)?
> 
> Well... I don't really know db file formats.  Most of the corruption
> I found in berkley db files.  mailgraph uses rrd.  mailman uses some
> form of berkley db, too.  I don't know what the corruption "looked"
> like other than the db library would no longer accept it.

db files are very fragile when it comes to OS or process crashes. There
is no logging, and writes are cached until the process exits or a
db->sync() is called, virtually guaranteeing corruption.  Ideally, db
files should only cache data and be rebuildable from other data, or
they should db->sync() after every write.  db 2+ databases can do
logging, but I don't know how many applications actually request it.

-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041123041107.GC48882>