Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-30938 checkCount/getCount double counting seeks #18093

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions system/jhtree/jhtree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2027,7 +2027,6 @@ unsigned __int64 CKeyCursor::getCount(KeyStatsCollector &stats)
{
reset();
unsigned __int64 result = 0;
unsigned lseeks = 0;
unsigned lastRealSeg = filter->lastRealSeg();
bool unfiltered = filter->isUnfiltered();
for (;;)
Expand All @@ -2037,23 +2036,20 @@ unsigned __int64 CKeyCursor::getCount(KeyStatsCollector &stats)
unsigned __int64 locount = getSequence();
endRange(lastRealSeg);
_ltEqual(stats);
lseeks++;
result += getSequence()-locount+1;
if (!incrementKey(lastRealSeg))
break;
}
else
break;
}
stats.noteSeeks(lseeks, 0, 0);
return result;
}

unsigned __int64 CKeyCursor::checkCount(unsigned __int64 max, KeyStatsCollector &stats)
{
reset();
unsigned __int64 result = 0;
unsigned lseeks = 0;
unsigned lastFullSeg = filter->lastFullSeg();
bool unfiltered = filter->isUnfiltered();
if (lastFullSeg == (unsigned) -1)
Expand All @@ -2071,7 +2067,6 @@ unsigned __int64 CKeyCursor::checkCount(unsigned __int64 max, KeyStatsCollector
unsigned __int64 locount = getSequence();
endRange(lastFullSeg);
_ltEqual(stats);
lseeks++;
result += getSequence()-locount+1;
if (max && (result > max))
break;
Expand All @@ -2081,7 +2076,6 @@ unsigned __int64 CKeyCursor::checkCount(unsigned __int64 max, KeyStatsCollector
else
break;
}
stats.noteSeeks(lseeks, 0, 0);
return result;
}

Expand Down
Loading