BIND 10 #324: improve SQL data source performance

BIND 10 Development do-not-reply at isc.org
Tue Apr 3 12:55:34 UTC 2012


#324: improve SQL data source performance
-------------------------------------+-------------------------------------
                   Reporter:  each   |                 Owner:  jinmei
                       Type:         |                Status:  reviewing
  enhancement                        |             Milestone:
                   Priority:         |  Sprint-20120403
  medium                             |            Resolution:
                  Component:  data   |             Sensitive:  0
  source                             |           Sub-Project:  DNS
                   Keywords:         |  Estimated Difficulty:  5
  performance                        |           Total Hours:  0
            Defect Severity:  N/A    |
Feature Depending on Ticket:         |
  sqlite schema upgrade              |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Changes (by jelte):

 * owner:  jelte => jinmei


Comment:

 Replying to [comment:23 jinmei]:
 > Replying to [comment:22 jelte]:
 >
 > That said, I tried to fix it in the branch anyway (4df83ec).  But I
 > couldn't come up with a reasonable test scenario, so I didn't add any
 > test.  So, I'm okay either with or without incorporating this
 > particular change to master.
 >

 this looks fine and I propose we include it. One trivial change could be
 to add Exclusive to the class name so we don't accidentally use it for
 normal transactions in the future. But i'll leave that up to you :)

 >
 > Yeah I had the same impression.  I still kept the inconsistent
 > variable naming in the initial implementation so they match the DB
 > column names. But now that you also pointed out the same thing, I
 > changed the variable names.  (In any event they are internal
 > variables, so we can easily change them).
 >

 ack

 > > Also perhaps we should set the major version in
 testdata/newschema.sqlite3  to something we never expect to actually reach
 (so that it won't fail on this test the moment we change schema version
 again :) ). Though of course it can be updated then as well. Come to think
 of it, all these db's need updating then. You were saying something about
 creating these in the tests themselves? :)
 >
 > As for newschema.sqlite3, yes, that's a good point.  I changed the
 > version to 1000.  Regarding the need for updating test DB files in
 > general, I think it's better to create test data at build/run time
 > dynamically (except for the intentionally unusual/broken ones).  But
 > I believe it's beyond the scope of this task and should go to a
 > separate ticket (maybe one of "hardening" things).
 >

 ok. Speaking of which, I found one other problem; the zonemgr tests have
 the side-effect of doing just this, by creating a database called
 initdb.file, and leaving it (until you run make clean). So if you switch
 to and from this branch (or later, if you pull the merge of this into
 master) and don't run make clean, these tests will fail with a database
 error.

 AFAICT, this file does not need to be kept, and we might as well delete it
 at the start of make check, i.e. something like
 {{{
 diff --git a/src/bin/zonemgr/tests/Makefile.am
 b/src/bin/zonemgr/tests/Makefile.
 index 8c6b904..1903995 100644
 --- a/src/bin/zonemgr/tests/Makefile.am
 +++ b/src/bin/zonemgr/tests/Makefile.am
 @@ -17,6 +17,7 @@ if ENABLE_PYTHON_COVERAGE
         rm -f .coverage
         ${LN_S} $(abs_top_srcdir)/.coverage .coverage
  endif
 +       rm -f initdb.file
         for pytest in $(PYTESTS) ; do \
         echo Running test: $$pytest ; \
         $(LIBRARY_PATH_PLACEHOLDER) \
 }}}

 >
 > Okay, thanks.  I'm giving the ticket back to you as I made a few non
 > trivial changes.

 With these things I think it can be merged.

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


More information about the bind10-tickets mailing list