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

Wait for reserved pool to become free #10686

Closed
wants to merge 1 commit into from

Conversation

sopel39
Copy link
Member

@sopel39 sopel39 commented Jan 19, 2022

Attempt to fix #10684
Certain operators will only release memory on close rather than finish (#10596), so perhaps there is a lag between query finished and memory being freed.

Fixes: #10684

@cla-bot cla-bot bot added the cla-signed label Jan 19, 2022
@sopel39 sopel39 requested a review from findepi January 19, 2022 12:42
@@ -324,7 +324,9 @@ public void testClusterPools()
for (TestingTrinoServer worker : queryRunner.getServers()) {
Optional<MemoryPool> reserved = worker.getLocalMemoryManager().getReservedPool();
assertTrue(reserved.isPresent());
assertEquals(reserved.get().getMaxBytes(), reserved.get().getFreeBytes());
while (reserved.get().getMaxBytes() != reserved.get().getFreeBytes()) {
MILLISECONDS.sleep(10);
Copy link
Member

Choose a reason for hiding this comment

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

assertEventually?

also, explain why eventual consistency can be observed here

@sopel39 sopel39 closed this Jan 19, 2022
@sopel39 sopel39 deleted the ks/wait_for_reserved branch January 19, 2022 13:57
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.

Flaky TestMemoryManager.testClusterPools
2 participants