[bind10-dev] [sprint planning] estimate results 20111206

Michal 'vorner' Vaner michal.vaner at nic.cz
Sat Nov 26 10:33:38 UTC 2011


Hello

On Tue, Nov 22, 2011 at 10:21:05AM -0800, JINMEI Tatuya / 神明達哉 wrote:
> At Tue, 22 Nov 2011 13:34:48 +0100,
> Michal 'vorner' Vaner <michal.vaner at nic.cz> wrote:
> 
> > > - - for #1395, the question was whether this wasn't a feature, not a bug
> > > - - for #1398, the question was whether this is needed and the code isn't
> > > already quite readable
> 
> #1398 is not a bug, but a suggested refactoring.

It is. However, I think that the current code is relatively easy to read. Maybe
just if we had a specific variable saying which type of stream it is. But having
a subclass for each type of scream means we will have the iteration through the
stream many times and they are mostly identical (as there's already a
polymorphism on the datasrc level) and there are only slight exceptions, like
the SOA handling. I believe introducing another level of indirection just
increases the size of code and makes it harder to grasp what is happening in
this case.

> I believe #1395 is a bug to be fixed (someday).

I remember a discussion about just this. That if any logging is used without it
being initialized, we must throw an exception, because it is possible someone
forgot and it would be bad.

And the datasrc library does log its own actions (which is reasonable to do).

So from this, I deduce that these two facts already lead to the fact the library
is _required_ to throw if it is used and logging is not initialized.

I don't think we want to rip the logging out. Neither I think we would like to
wrap all logging statements in some kind of „if (log_enable)“ or
„#ifdef LOG_ENABLE“. And setting log_enable = false is same amount of work to
call log_init("something", LOG_NONE) (+- exact syntax).

Therefore, the question to ask here is, do we want to revisit the previous
decision to throw on uninitialized use of logging? Is it better to be safe or to
save users the one line of initializing logging? (and even if we didn't throw,
the library still depends on the liblog, there are at last the calls to
is_XXXX_enabled checks).

With regards

-- 
XML is like violence. If it doesn't solve your problem, use more.

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/20111126/fc308019/attachment.bin>


More information about the bind10-dev mailing list