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

Fix for the TopNList add method #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix for the TopNList add method #3

wants to merge 1 commit into from

Conversation

finleysg
Copy link

The original would only add the first N key-values encountered

The original would only add the first N key-values encountered
@finleysg
Copy link
Author

In the original, the top N members of the array would simply be the first N to arrive because the second block:

else if (topNCountsForColumnArray.length == maxSize)

would never allow the thread to get to the third block.

The third block also used a .insert() method rather than a .update() method, so if we did reach that block, we would run out of heap memory on a large table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant