Opened 7 years ago

Closed 7 years ago

#2585 closed defect (fixed)

bugs in in-memory finder

Reported by: jinmei Owned by: jinmei
Priority: medium Milestone: Sprint-20130219
Component: data source Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DNS Feature Depending on Ticket:
Estimated Difficulty: 4 Add Hours to Ticket: 0
Total Hours: 1 Internal?: no

Description (last modified by jinmei)

#2480 revealed three bugs in the in-memory zone finder implementation:

TEST_P(QueryTest, exactAnyMatch) {
    // there's a bug in the in-memory data source and this doesn't work
...
}
TEST_P(QueryTest, wildcardNxrrsetWithDuplicateNSEC) {
    // TODO: this seems to be an in-memory specific bug
...
}

TEST_P(QueryTest, wildcardNxrrsetWithNSEC) {
    // This is an in-memory specific bug (#2585), until it's fixed we
    // tentatively skip the test for in-memory
...
}

The first one because we substitute the owner name of RRsets for type
ANY queries unconditionally (which will confuse the isSameKind() check
later):

            target->push_back(createTreeNodeRRset(node, cur_rds, rrclass_,
                                                  options, &name));

The latter two are because we substitute the owner name of NSEC for
NXRRSET while we shouldn't:

    // No exact match or CNAME.  Get NSEC if necessary and return NXRRSET.
    return (createFindResult(rrclass_, zone_data_, NXRRSET, node,
                             getNSECForNXRRSET(zone_data_, options, node),
                             options, wild, &name));

Fixing these should be easy, but they should have been caught in unit
tests for the zone finder in the first place, so we need such tests,
too. We should then also re-enable the disabled tests in query_unittest.

Subtickets

Change History (13)

comment:1 Changed 7 years ago by jinmei

  • Description modified (diff)

comment:2 Changed 7 years ago by jinmei

  • Milestone changed from Previous-Sprint-Proposed to Next-Sprint-Proposed

comment:3 Changed 7 years ago by jelte

  • Milestone changed from Next-Sprint-Proposed to Sprint-20130219

comment:4 Changed 7 years ago by jinmei

  • Owner set to jinmei
  • Status changed from new to accepted

comment:5 Changed 7 years ago by jinmei

trac2585 is ready for review.

Diff is small and should be straightforward and non controversial.

The effect is minor, but since it's a user-visible bug, it's probably
better to provide a changelog entry. Proposal:

568.?	[bug]		jinmei
	libdatasrc/b10-auth: corrected some corner cases in query handling
	of in-memory data source that led to the following invalid/odd
	responses from b10-auth:
	- duplicate RRs in answer and additional for type ANY query
	- incorrect NSEC for no error, no data (NXRRSET) response that
	  matches a wildcard
	(Trac #2585, git TBD)

comment:6 Changed 7 years ago by jinmei

  • Owner changed from jinmei to UnAssigned
  • Status changed from accepted to reviewing

comment:7 follow-up: Changed 7 years ago by jelte

  • Owner changed from UnAssigned to jinmei

did you push this? I do not see a branch trac2585...

comment:8 in reply to: ↑ 7 Changed 7 years ago by jinmei

Replying to jelte:

did you push this? I do not see a branch trac2585...

oops, did I do it again? Sorry about that, just pushed it.

comment:9 Changed 7 years ago by jinmei

  • Owner changed from jinmei to UnAssigned

comment:10 Changed 7 years ago by jelte

  • Owner changed from UnAssigned to jelte

comment:11 follow-up: Changed 7 years ago by jelte

  • Owner changed from jelte to jinmei

looks OK, please go ahead and merge

comment:12 in reply to: ↑ 11 Changed 7 years ago by jinmei

Replying to jelte:

looks OK, please go ahead and merge

Thanks, merge done, closing.

comment:13 Changed 7 years ago by jinmei

  • Resolution set to fixed
  • Status changed from reviewing to closed
  • Total Hours changed from 0 to 1
Note: See TracTickets for help on using tickets.