In message , Chris Tho
mpson writes:
> On Oct 13 2008, Jack Tavares wrote:
> >I see the options clause to limit the journal file size, but I was wondering
> >what happens when the limit is reached?
> >
> >Is everything in the file (after ensuring that it has been persisted to the
> >zone file) wiped out and does the file start over?
> >
> >are N records removed to make room? (with N being some either fixed or
> >variable number based on the max size of the file specified)?
> >
> >ie:
> >file size 1M.
> >1M size gets reached
> >
> >Does the file get emptied/deleted and start over
> >
> >Does the file get reduced by 10%, 50% ?

> Roughly the last half of the journal file is retained. (Always subject
> to the constraint that journal entries for changes not yet written to
> the zone file are never discarded.)
> There used to be a sneaky way of doing this in place: the index was
> rewritten to invalidate the entries in the first half, the remaining
> entries were copied to the space thus freed, and then the index was
> updated to point to the copy. (The index is 512 bytes at the start
> of the file, assumed to be written atomically.) But I think that
> BIND 9.4.x (and later?) no longer does this, but always writes a new
> file and renames: maybe there were too many corner cases?

Replay from the journal and truncation couldn't occur
simultaneously. It ended up being simpler to re-write and
let the replay continue from the now unlinked journal on
filesystems that support this. For filesystems that don't
support this we do other things.

Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: