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 NPE when moving unregistered query between memory pools #725

Merged
merged 1 commit into from
May 7, 2019

Conversation

dain
Copy link
Member

@dain dain commented May 7, 2019

Fixes #724

@cla-bot cla-bot bot added the cla-signed label May 7, 2019
@@ -250,6 +251,10 @@ public synchronized void freeRevocable(QueryId queryId, long bytes)
long originalRevocableReserved = getQueryRevocableMemoryReservation(queryId);
// Get the tags before we call free() as that would remove the tags and we will lose the tags.
Map<String, Long> taggedAllocations = taggedMemoryAllocations.remove(queryId);
if (taggedAllocations == null) {
// query is not registered (likely a race with query completion)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eg cancellation or LIMIT ?

@dain dain merged commit bd75aa4 into trinodb:master May 7, 2019
@dain dain mentioned this pull request May 7, 2019
5 tasks
@dain dain deleted the memory-pool-npe branch May 10, 2019 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

NullPointerException when local memory limits are exceeded
2 participants