[bind10-dev] (xfrout) ZoneIterator (was Re: revised/refactored data source design proposal)
Jelte Jansen
jelte at isc.org
Tue Jun 7 09:05:48 UTC 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 06/06/2011 09:06 PM, JINMEI Tatuya / 神明達哉 wrote:
>
> and tries to get RRs via mysql_fetch_row(result), other process or
> thread cannot change (they should be able to start a write transaction
> but cannot complete committing it) the database until this client
> performs "mysql_free_result(result)".
>
> A common practice in such a case is to use mysql_store_result()
> instead of mysql_use_result(conn), but I suspect it's also problematic
> for a huge zone because the resulting data can be very big and may
> even bigger for the reasonably available memory for the server.
>
I think we should let this depend on the specific backend then; loading the
entire zone into memory for an axfr (or big ixfr) isn't feasible imo, so if at
all possible we should have a smart iterator (that reads in separate chunks at a
time). If this is not possible with any specific backend, or if locking would
cause problems, we can read it at once and then serve it. And document that you
should not use that specific backend for large zones.
What I also miss in the proposal is how to do IXFR-out, regardless of how to do
it in a backend implementation, how to store diffs/history or even whether a
specific backend supports it). Would this be an option in ZoneIterator, or
really a separate class (which then perhaps uses zoneiterator, as ixfr is in
some ways an iteration of iterations, where axfr could be seen as a special case
of that, with only 1 'outer' iteration)?
Jelte
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk3t6ewACgkQ4nZCKsdOncXdxQCdG7LjfDCjFRuiSFyaGFk1ImrY
paUAoKFDrEehh1yNSZ+uXjCU/PMsP6YI
=A9u+
-----END PGP SIGNATURE-----
More information about the bind10-dev
mailing list