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

bug(streaming): TopNCache::estimated_heap_size wrong #14530

Closed
st1page opened this issue Jan 12, 2024 · 0 comments · Fixed by #14564
Closed

bug(streaming): TopNCache::estimated_heap_size wrong #14530

st1page opened this issue Jan 12, 2024 · 0 comments · Fixed by #14564
Labels
good first issue Good for newcomers help wanted Issues that need help from contributors type/bug Something isn't working
Milestone

Comments

@st1page
Copy link
Contributor

st1page commented Jan 12, 2024

Some user report that the memory metrics is wrong for streaming query with topN

It is because the TopNCacheState::extract_if and TopNCacheState::retain do not maintain the kv_size correctly.

pub fn extract_if<F>(&mut self, pred: F) -> ExtractIf<'_, CacheKey, CompactedRow, F, Global>
where
F: FnMut(&CacheKey, &mut CompactedRow) -> bool,
{
self.inner.extract_if(pred)
}
pub fn retain<F>(&mut self, f: F)
where
F: FnMut(&CacheKey, &mut CompactedRow) -> bool,
{
self.inner.retain(f)
}
}

@github-actions github-actions bot added this to the release-1.7 milestone Jan 12, 2024
@st1page st1page added help wanted Issues that need help from contributors good first issue Good for newcomers type/bug Something isn't working labels Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Issues that need help from contributors type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant