If you are talking about BIND9 atomic replacement on Windows then it
does, at least when I wrote that piece of code. It very carefully makes
sure it doesn't lose the file.

Danny

On 11/12/18 6:21 PM, Mark Andrews wrote:
> It really depends on the platform.
>
> Windows doesn’t support atomic replacement via rename.
>
> On platforms where atomic replacement via rename is supported it is used.
>
> Mark
>
>> On 13 Nov 2018, at 6:39 am, Marcus Frenkel <marcus.fren...@gmail.com> wrote:
>>
>> Thank you for the quick reply Tony!
>>
>> Follow-up questions just to be sure:
>> 1. The new zone file is renamed in the placed of the old one, only after all 
>> changes to the new file are written?
>> 2. Is the zone file atomically replaced during the renaming process, in a 
>> sense that there is no window in which the file is empty or non-existent?
>>
>> I'm running BIND on Debian 9. Based on this Linux man page, the rename 
>> function should be atomic. I would not imagine that BIND does it in 
>> different way, like the worst case scenario to first remove the current file 
>> and then move the new one to the same path. I know I'm too cautious, I'm 
>> just trying to avoid any chance for rsync to transfer incomplete or empty 
>> zone file, or maybe delete the file at the destination if it does not exist 
>> at the source for a short moment.
>>
>> Marcus
>>
>> On Mon, Nov 12, 2018 at 7:19 PM Tony Finch <d...@dotat.at> wrote:
>> Marcus Frenkel <marcus.fren...@gmail.com> wrote:
>>> I need to know how BIND writes to slave zone files after zone has been
>>> updated. Does it modify the file in place or it replaces the file with
>>> new one at once?
>> Changes are written to a journal append-only style. Every so often the
>> master file is rewritten to incorporate the contents of the journal; this
>> is done by writing to a new file and renaming it in place of the old one.
>>
>> Tony.
>> -- 
>> f.anthony.n.finch  <d...@dotat.at>  http://dotat.at/
>> sovereignty rests with the people and authority
>> in a democracy derives from the people
>> _______________________________________________
>> Please visit https://lists.isc.org/mailman/listinfo/bind-users to 
>> unsubscribe from this list
>>
>> bind-users mailing list
>> bind-users@lists.isc.org
>> https://lists.isc.org/mailman/listinfo/bind-users

Attachment: pEpkey.asc
Description: application/pgp-keys

_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Reply via email to