This is a discussion on Re: journal file size limit - DNS ; 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 ...
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)?
>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?