Skip to content

Commit

Permalink
HPCC-32856 CKeyCursor should link parent nodes as well as current node
Browse files Browse the repository at this point in the history
More changes following review/testing/discussion

Signed-off-by: Richard Chapman <[email protected]>
  • Loading branch information
richardkchapman committed Nov 27, 2024
1 parent 0fb7331 commit 501c735
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions system/jhtree/jhtree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1880,6 +1880,12 @@ bool CKeyCursor::_next(IContextLogger *ctx)
}
parents[depth].clear();
}
else
{
// We can't tell which parent node info is correct. Clear them all.
clearParentNodes();
break;
}
}
return node->isKeyAt(0);
}
Expand Down Expand Up @@ -1996,7 +2002,7 @@ bool CKeyCursor::_gtEqual(IContextLogger *ctx)
int rc = startnode->compareValueAt(recordBuffer, numParentKeys-1);
if (rc <= 0)
{
lwm = parentNodeKey+1;
lwm = parentNodeKey;
node.set(startnode);
break;
}
Expand Down Expand Up @@ -2098,7 +2104,7 @@ bool CKeyCursor::_ltEqual(IContextLogger *ctx)
int rc = startnode->compareValueAt(recordBuffer, numParentKeys-1);
if (rc < 0)
{
lwm = parentNodeKey+1;
lwm = parentNodeKey;
node.set(startnode);
break;
}
Expand Down

0 comments on commit 501c735

Please sign in to comment.