-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Remove mechanism for supporting multiple memory pools #11071
Conversation
65d25c4
to
3af6d4e
Compare
@findepi PTAL at this one too. |
core/trino-main/src/main/java/io/trino/execution/MemoryRevokingScheduler.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/memory/ClusterMemoryManager.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/memory/ClusterMemoryManager.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/memory/ClusterMemoryManager.java
Outdated
Show resolved
Hide resolved
private final MBeanExporter exporter; | ||
@GuardedBy("this") | ||
private final List<MemoryPool> pools = new ArrayList<>(); | ||
private MemoryPool pool; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
final
.
still @GuardedBy("this")
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. Also it feels we did not need that synchronization before neither (give destroy is called once)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually we do not need pool field at all - just a boolean flag if we exported JMX bean.
core/trino-main/src/test/java/io/trino/memory/LowMemoryKillerTestingUtils.java
Outdated
Show resolved
Hide resolved
...src/test/java/io/trino/plugin/resourcegroups/db/TestDbResourceGroupConfigurationManager.java
Outdated
Show resolved
Hide resolved
testing/trino-tests/src/test/java/io/trino/memory/TestMemoryManager.java
Outdated
Show resolved
Hide resolved
3af6d4e
to
1a662a3
Compare
369b6f6
to
5c61526
Compare
@ResourceSecurity(MANAGEMENT_READ) | ||
@GET | ||
@Path("{poolId}") | ||
public Response getMemoryInfo(@PathParam("poolId") String poolId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dain @findepi @arhimondr
I am a bit concerned about the removal of this endpoint. What was the target audience? Can it backfire?
getMemoryInfo
above changed from POST
to GET
has the relevant information but it is tagged with INTERNAL_ONLY
security so cannot be used as a replacement.
And I am also not sure if I can safely change INTERNAL_ONLY
to MANAGEMENT_READ
above.
Would appreciate some help here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I can keep it with paramter and require that caller always has to pass "general" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure who uses that. Maybe @electrum does? If you do what to keep it, change the annotation to @Path("general")
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was for internal monitoring at Facebook. I'm fine with removing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks guys:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
core/trino-main/src/main/java/io/trino/execution/MemoryRevokingScheduler.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/memory/ClusterMemoryManager.java
Outdated
Show resolved
Hide resolved
5c61526
to
cd2cdda
Compare
@arhimondr AC: diff |
CI:#10932 |
Description
Remove support for reserved memory pool.
Mechanism did not prove to be useful and was disabled by default.
Removing to simplify codebase.
After getting rid of the reserved pool we have just one pull and we can remove the mechanism for supporting multiple memory pool altogether.
Improvment
query engine, SPI
Related issues, pull requests, and links
fixes #6677
Documentation
(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( ) No release notes entries required.
(x) Release notes entries required with the following suggested text: