BIND 10 #2573: extend MasterLoader and ZoneLoader to return additional states including # of loaded RRs

BIND 10 Development do-not-reply at isc.org
Thu Jan 17 21:45:52 UTC 2013


#2573: extend MasterLoader and ZoneLoader to return additional states including #
of loaded RRs
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  task          |  jinmei
            Priority:  medium        |                       Status:
           Component:  libdns++      |  reviewing
            Keywords:                |                    Milestone:
           Sensitive:  0             |  Sprint-20130122
         Sub-Project:  DNS           |                   Resolution:
Estimated Difficulty:  4             |                 CVSS Scoring:
         Total Hours:  1.81          |              Defect Severity:  N/A
                                     |  Feature Depending on Ticket:
                                     |  loadzone-ng
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------

Comment (by jinmei):

 Replying to [comment:8 vorner]:

 > > Actually, I wondered the same thing, so I made that change.
 > > getPosition and getSize were now deprecated and removed from
 > > `ZoneLoader`.  I chose to return an integer between 0 and 100 instead
 > > of floating points as integers are generally easier to use and I
 didn't
 > > see the need for higher granularity than that.  But that's not a
 > > strong opinion.
 >
 > The int is probably OK, I just wonder about two things (but feel free to
 ignore them):
 >  * Sometimes, 100 is too little granularity. Some programs write
 percentages with precision of tenths (so 42.1%, for example). Also, if
 someone created a GUI progress bar, these are usually longer than 100px
 (with screens in sizes of 1000+). If the progressbar had a length of 1000,
 then it would jump by blocks of 10, which is visually disruptive in case
 it loads for longer time (5 minutes, for example). Maybe keep it as int,
 but set the maximum to 10000, or something? It would be no problem to
 divide it by 100 when writing full percents.

 Point taken, especially about the GUI example.  To this end I'd simply
 return the original double value and let the caller convert to
 whatever it wants.  And I changed the implementation that way.

 The changes are basically trivial, but not one-liner type of update,
 so I'm giving the ticket back to you.

 >  * If the `PROGRESS_UNKNOWN` was something large instead, we could use
 `unsigned`. Wouldn't it be better?

 I don't have a strong opinion, but using a minus has its own advantage
 that it's much less likely to conflict with any future changes of the
 valid range.  Also, now that it's double, I guess making the return
 value unsigned does not matter much.  At the moment I've kept it as
 is.

 > I also noticed some very minor whitespace and capitalization problems,
 and it seemed easier to just fix them on the branch. I don't think you
 would disagree with them, but if so, that's OK, feel free to revert.

 I have no preference or opinion (there was no specific reason for the
 original ordering).  So I just changed it to the one you prefer.

 BTW, as for your editorial changes: Putting two space characters as a
 sentence separator was intentional.  I believe that's actually a
 common style of English writing (just like in this particular ticket
 comment).  But I don't mind using a single space (and those comments
 are not formal English text anyway), so I didn't touch it.

-- 
Ticket URL: <http://bind10.isc.org/ticket/2573#comment:9>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list