journal file size limit

Chris Thompson cet1 at cam.ac.uk
Mon Oct 13 16:19:19 UTC 2008


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?

-- 
Chris Thompson
Email: cet1 at cam.ac.uk


More information about the bind-users mailing list