BIND 10 #2165: update Message::addRRset() to be unaware of signedness

BIND 10 Development do-not-reply at isc.org
Wed Aug 22 16:48:56 UTC 2012


#2165: update Message::addRRset() to be unaware of signedness
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  UnAssigned
  jinmei                             |                Status:  reviewing
                       Type:  task   |             Milestone:
                   Priority:         |  Sprint-20120904
  medium                             |            Resolution:
                  Component:         |             Sensitive:  0
  libdns++                           |           Sub-Project:  DNS
                   Keywords:         |  Estimated Difficulty:  5
            Defect Severity:  N/A    |           Total Hours:  0
Feature Depending on Ticket:         |
  scalable inmemory                  |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------

Comment (by jinmei):

 Replying to [comment:6 muks]:

 > It throws an exception that "database is locked" in
 `SQLite3Accessor::startUpdateZone()`. I am trying to figure out why that
 happens.

 It can be reproduced with the following simplified tests:

 {{{#!python
 class DataSrcUpdater(unittest.TestCase):

     def setUp(self):
         # Make a fresh copy of the writable database with all original
 content
         shutil.copyfile(READ_ZONE_DB_FILE, WRITE_ZONE_DB_FILE)

     def test_update_delete_commit(self):

         dsc = isc.datasrc.DataSourceClient("sqlite3",
 WRITE_ZONE_DB_CONFIG)
         updater = dsc.get_updater(isc.dns.Name("example.com"), True)

     def test_update_delete_abort(self):

         # we don't do enything with this one, just making sure loading two
         # datasources
         dsc = isc.datasrc.DataSourceClient("sqlite3",
 WRITE_ZONE_DB_CONFIG)
         updater = dsc.get_updater(isc.dns.Name("example.com"), True)
         raise Exception('foo')
 }}}
 (note that deleter_abort will be tested first)

 I suspect the test framework keeps the local objects (in particular
 updater) alive on raise (maybe to print debug info?), and the
 zombie 'updater' object from test_update_delete_abort prevents from
 the new one in test_update_delete_commit from working.

 Running it with B10_LOGGER_DESTINATION=stdout seems to support this
 theory.  You'll see this after test reports:

 {{{
 2012-08-22 09:41:42.959 INFO  [bind10.datasrc]
 DATASRC_DATABASE_UPDATER_ROLLBACK zone updates roll-backed for
 'example.com./IN' on sqlite3_rwtest.sqlite3.copied
 }}}

 It indicates the updater from delete_abort rolls back its transaction
 only after the tests are completed.  If you remove the raise, you'll
 see the ROLLBACK logs (there are two of them) before the output from
 the test framework.

 One other thing: this won't work because rrset_to_delete now wouldn't
 have RRSIGs.

 {{{#!python
         self.assertRaises(isc.datasrc.Error, updater.delete_rrset,
                           rrset_to_delete)
 }}}

 And one final thing at this moment: I think in database.cc we should
 avoid including RRSIGs from the beginning if they are not required.
 I believe we can do the trick in getRRsets().  Then we won't have to
 do expensive stripRRsigs() (in general, if we need explicitly do
 things like in any other place than in the current in-memory
 implementation I think it's not the correct way).

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


More information about the bind10-tickets mailing list