BIND 10 #2850: Define and implement ZoneTableSegmentMapped

BIND 10 Development do-not-reply at isc.org
Tue Jun 4 06:25:19 UTC 2013


#2850: Define and implement ZoneTableSegmentMapped
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:  muks
                Type:  task          |                       Status:
            Priority:  medium        |  closed
           Component:  data source   |                    Milestone:
            Keywords:                |  Sprint-20130611
           Sensitive:  0             |                   Resolution:  fixed
         Sub-Project:  DNS           |                 CVSS Scoring:
Estimated Difficulty:  5             |              Defect Severity:  N/A
         Total Hours:  21.40         |  Feature Depending on Ticket:
                                     |  shared memory data source
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
Changes (by muks):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 Merged to `master` branch in commit
 `587f61464634214c7cdbbb204652eb63b11eea3b`:
 {{{
 * 1ee8b5e [2850] Handle MemorySegmentGrown when creating the segment
 object holder
 * 67b935d [2850] Assert that the segment is not grown during
 allMemoryDeallocated()
 * 127d2f3 [2850] Unify comments
 * 33f75a5 [2850] ZoneWriter updates
 * e4a8174 [2850] Add a comment
 * 85fcde6 [2850] Cache the header address for read-only segments
 * 9440c15 [2850] Update if statement slightly (doesn't change behavior)
 * c226db7 [2850] style matter: combined two short lines.
 * 54c8596 [2850] Use non-const implementation of allMemoryDeallocated()
 again
 * 14398c5 [2850] Validate names in all name-related methods
 * 62b6680 [2850] Move allocate_size_ to private class
 * 5fe7172 [2850] Remove ZoneTableSegment::resetHeader()
 * 861f24e [2850] Comment new ZoneTable::destroy() argument
 * a66bb4b [2850] Fix indenting
 * cc48991 [2850] Update code to use safer ZoneTable::create()
 * f91e51c [2850] a minor comment wording fix
 * 94bd413 Revert "[2850] Add a way to pass a seed to the random number
 generator"
 * f5b8169 [2850] Check if ZoneTableHeader name exists in an existing
 segment
 * a5f749a [2850] Check the case where READ_WRITE mode doesn't find a
 checksum in an existing segment
 * 498c4d6 [2850] Add comment that the string returned by getImplType()
 should match the one passed to create()
 * cb05a97 [2850] Update comment about when the segment had been cleared
 * 3a7105d [2850] Add a comment about unsafe code
 * 8f4a847 [2850] Correct type of exception thrown and also add a test for
 it
 * a8594f3 [2850] Remove assertions that are unnecessary now
 * cc51cce [2850] Reject empty names too in setNamedAddress()
 * cfeb578 [2850] Reserve names beginning with _ for internal use only
 * 214d50f [2850] Constify allMemoryDeallocated() again
 }}}

 Merged to `master` branch in commit
 `650c6ce282800e712fb378741638ac66240d59c0`:
 {{{
 * 7ad877f [2850] removed now-unused inclusion and using for
 boost::scoped_ptr
 * c312fa4 [2850] Update comment that it doesn't actually fail
 * 211389e [2850] Remove unnecessary setup of named addresses
 * de6e68c [2850] Fix MemorySegmentMapped::allMemoryDeallocated() and make
 it non-const
 * 3c98ade [2850] Looks like flush() finalizes base_sgmt_, so we free
 before that
 * bf30f05 [2850] Pre-reserve some memory to workaround relocations in
 setNamedAddress()
 * 1759095 [2850] Throw std::bad_alloc if ZoneTable::create() throws
 MemorySegmentGrown
 * e2889aa [2850] Make more updates to ZoneTableSegment API documentation
 * 9e44958 [2850] Make more updates to ZoneTableSegment API documentation
 * 76e6edb [2850] Update Makefile.am for renamed files
 * 6bff7db [2850] Update ZoneTableSegment API documentation
 * 5bfdcfa [2850] Add API doc comments about plans to make reset(), etc.
 non-virtual
 * 46bf6c0 [2850] Add explicit include for zone_table_segment.h
 * c6cadeb [2850] Add default case for switch on MemorySegmentOpenMode
 * 8ba0a7b [2850] Add tests to check that resetHeader() is called by
 ZoneWriter class
 * db8cec0 [2850] Change style of code to fix buildbot failures
 * bc3d482 [2850] Add isUsable() and getImplType() methods
 * 32d750c [2850] Rename MemorySegmentTest to MemorySegmentMock (to not
 resemble a fixture)
 * 7bea7dd [2850] Rename ZoneTableSegmentTest to ZoneTableSegmentMock (to
 not resemble a fixture)
 * 4cac3dd [2850] Destroy ZoneTableSegment object upon exception (see full
 log)
 * eda6761 [2850] Add CREATE over corrupted file testcase
 * 8d9a833 [2850] Check that the old data is still available after the
 corruption tests
 * 14a3513 [2850] Remove obsolete comment (isWritable() no longer throws)
 * cea0d10 [2850] Add a test for clear() on an uninitialized segment
 * 3ebd4b0 [2850] Add resetHeader() method
 * 299f1f5 [2850] Include <cerrno> for errno
 * ad0e3e2 [2850] Simplify the corruption of checksum
 * 2015f73 [2850] Use pre-created test data so that it's not confusing to
 check
 * a7dac3f [2850] Remove unnecessary use of scoped_ptr
 * e6d1be1 [2850] Handle current_filename_ assignment causing an exception
 * 148c5bb [2850] Make getHeader() return the current address of header
 * 4542e89 [2850] Remove obsolete comment
 * 56d109e [2850] Fix address name generation
 * 9d90db2 [2850] style cleanups: spacing, combining short lines
 * d003ebd [2850] minor style cleanups: constify and brace position
 * 9b93027 [2850] unrelated cleanup: make some test methods non public when
 possible
 * f7cfb33 [2850] style cleanup: added () for returned values
 * 1fd14df [2850] Add corruption tests
 * 39fba2a [2850] Add a sync() method and make reset() and the destructor
 call it
 * 5577948 [2850] Unify code
 * 3af2603 [2850] Fix type of checksum
 * 03ce449 [2850] Fix ZoneTableSegmentMappedTest.resetBadConfig test
 * 9784a18 [2850] Add tests for the various open modes
 * 5082c25 [2850] Constify getNamedAddress()
 * 3599c07 [2850] Add a way to pass a seed to the random number generator
 * 043b3d2 [2850] Make minor coding style fixes
 * b5cd040 [2850] Include dependency header in random_number_generator.h
 itself
 * 54a1d02 [2850] Make a minor comment update
 * 7d1a2ca [2850] Don't use the term "load" when describing what reset()
 does
 * ad23342 [2850] Update comment to match code
 * 0dccb67 [2850] Add a comment
 * 622d3e7 [2850] Implement the strong exception guarantee
 * 6bb2e2d [2850] Handle the case where setNamedAddress() may invalidate
 the passed address
 * 366cf13 [2850] Add different exception definitions for the kind of
 exceptions reset() may throw
 * 1861951 [2850] Add the ZoneTableSegment::clear() method
 * 6548cfe [2850] Unify checksum and header processing code
 * 02c2f7f [2850] Indent correctly
 * ca15d37 [2850] Split large switch block into methods
 * 1038645 [2850] Build ZoneTableSegmentMapped only where shared memory
 support is enabled
 * f41e4c3 [2850] Comment the newly introduced constants
 * b30eb93 [2850] Avoid hardcoding magic keywords, and use constants
 instead
 * ac47329 [2850] Add test for empty params argument to reset()
 * 3456e30 [2850] Don't declare a global static std::string object to avoid
 init fiasco
 * 4325f3d [2850] Remove TearDown() method from ZoneTableSegmentMappedTest
 * 74bad1a [2850] Clarify API doc about exceptions in ZoneWriter::cleanup()
 * 035fbe1 [2850] Fix ZoneWriter constructor API doc
 * 5d65c74 [2850] Throw isc::InvalidOperation instead of isc::Unexpected
 * 2b96d44 [2850] Make ZoneTableSegmentLocal::reset() throw NotImplemented
 exception
 * 79fe8bd [2850] removed unused functions
 * 1815740 [2850] Move reset() method to the base ZoneTableSegment class
 * 0b7af64 [2850] Update comment about not verifying checksum for a read-
 only segment
 * a1d8193 [2850] Make isWritable() not throw
 * 26326a8 [2850] Update isWritable() API doc
 * 7a49270 [2850] Remove empty ZoneTableSegment destructor
 * c45efc1 [2850] Pass ZoneTableSegment by reference to the ZoneWriter
 constructor
 * 4a5506e [2850] Change exception type thrown, and document it
 * e646d8a [2850] Remove getZoneWriter() method
 * 68343c8 [2850] Make getNamedAddress() return a std::pair
 * 10f2ae4 [2850] some editorial/style cleanups:
 * bd7e567 [2850] constify
 * 85873bf [2850] simplification: instantiate ZoneWriter directly.
 * 909a05a [2850] constify
 * 1453084 [2850] a minor wording fix in doc: use "a zone" instead of
 "zones" for writer.
 * fa4c5b9 [2850] use 'update' instead of 'reload' for getZoneWriter doc.
 * 53a1410 [2850] Test that the dynamic_cast passes every time
 * 832edda [2850] Test resetting a ZoneTableSegmentMapped in READ_WRITE
 mode when the file exists
 * c055314 [2850] Add API documentation
 * d861199 [2850] Define and implement ZoneTableSegmentMapped
 * 8469967 [2850] Add ZoneTableSegment::isWritable() method
 * 58a2bdc [2850] Make getZoneWriter() non-virtual
 }}}

 Resolving as fixed. Thank you for the reviews Jinmei.

-- 
Ticket URL: <https://bind10.isc.org/ticket/2850#comment:42>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list