[bind10-dev] Creation of zone in DB (again)

Michal 'vorner' Vaner michal.vaner at nic.cz
Tue Jan 29 11:00:08 UTC 2013


Hello

Currently, when we create a new zone in database, we do it by a separate call
outside of a transaction. This has some drawbacks we need to solve:
 • When the zone is being created, it is created empty and then a transaction is
   opened to fill in the data. The filling in can take some amount of time, and
   for this time, the database contains broken data (we return SERVFAIL for any
   query inside the zone, since it doesn't have SOA record). This can be several
   minutes.
 • If the loading fails, an empty zone is left in the database. The b10-loadzone
   manually deletes it when the loading fails. But that's not bullet proof, if
   you turn off the power (or kill b10-loadzone with -9), the cleanup doesn't
   happen and the empty zone is left there. The XfrIn doesn't do this kind of
   cleanup currently, so it leaves the empty zone every time there's an error on
   the first download.

I believe we should be creating the new zone inside the same transaction and
commit it together with the data inside it. After all, that's what transactions
are for. But when we talked about the interface to add new zones, we were in
hurry, so we didn't finish the discussions about the interface. We should resume
it now.

I see two options:
 • getUpdater gets a flag „canCreate“, which would allow it to create a new
   zone.
 • The createZone returns updater directly.

Any other options? Or, any option how to do it properly without a transaction?

Thank you

-- 
When eating an elephant take one bite at a time.
		-- Gen. C. Abrams

Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20130129/c9665f7f/attachment-0001.bin>


More information about the bind10-dev mailing list