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

Nullify DriverFactory#operatorFactories on noMoreDrivers #21706

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

radek-kondziolka
Copy link
Contributor

@radek-kondziolka radek-kondziolka commented Apr 25, 2024

Description

It can happen that operator factories live longer than operators what can cause that considerable amount of memory is not freed. Specifically, PartitionedLookupSourceFactory (that retained size can be very big) is kept by chain of reference JoinBridgeManager <- HashBuilderOperator <- operatorFactories <- driverFactory even if operators are finished.

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

# Section
* Prevent worker nodes from failing due to out-of-memory in concurrent scenarios. ({issue}`21706`)

@findepi
Copy link
Member

findepi commented Apr 25, 2024

Shouldn't this factories release memory in theirs io.trino.operator.OperatorFactory#noMoreOperators()?

@radek-kondziolka radek-kondziolka force-pushed the nullify_operator_factories branch 2 times, most recently from ab9e612 to 4cd5c78 Compare April 25, 2024 11:58
@radek-kondziolka
Copy link
Contributor Author

Shouldn't this factories release memory in theirs io.trino.operator.OperatorFactory#noMoreOperators()?

We could do it but taking this approach (proposed one) addresses potential issues for all operators.

@radek-kondziolka radek-kondziolka force-pushed the nullify_operator_factories branch 2 times, most recently from 8748938 to 3e593ef Compare April 25, 2024 12:05
@@ -88,6 +90,7 @@ public OptionalInt getDriverInstances()
return driverInstances;
}

@Nullable
Copy link
Member

Choose a reason for hiding this comment

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

it should be from jakarta.annotation package

@sopel39
Copy link
Member

sopel39 commented Apr 25, 2024

there are maven failures, see https://github.com/trinodb/trino/pull/21706/files#r1580024450

@radek-kondziolka radek-kondziolka force-pushed the nullify_operator_factories branch 2 times, most recently from 3210779 to c92205a Compare April 26, 2024 09:26
It can happen that operator factories live longer than operators
what can cause that considerable amount of memory is not freed.
@sopel39 sopel39 merged commit 0aadb15 into trinodb:master Apr 26, 2024
95 checks passed
@github-actions github-actions bot added this to the 446 milestone Apr 26, 2024
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.

None yet

3 participants