-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Adjust sampling max size limit to depend on heap size #137482
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
base: main
Are you sure you want to change the base?
Adjust sampling max size limit to depend on heap size #137482
Conversation
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.
Pull Request Overview
This PR modifies the max size limit on sampling configurations to be dynamically calculated as 1% of a node's heap size instead of using a fixed 5GB limit, with a minimum floor of 100KB to ensure reasonable defaults for small heap environments.
- Replaces static
MAX_SIZE_LIMIT_GIGABYTESconstant with heap-based percentage calculation - Introduces
DEFAULT_MAX_SIZE_FLOORconstant for minimum size guarantee - Updates validation logic and test data generation to use dynamic heap-based limits
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| SamplingConfiguration.java | Core implementation of heap-based size calculation and validation logic |
| SamplingConfigurationTests.java | Updated test generation and validation to use dynamic heap limits |
| TransportPutSampleConfigurationActionTests.java | Modified random test data generation to use fixed MB values |
| TransportDeleteSampleConfigurationActionTests.java | Modified random test data generation to use fixed MB values |
| GetAllSampleConfigurationActionIT.java | Modified random test data generation to use fixed MB values |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
server/src/main/java/org/elasticsearch/action/admin/indices/sampling/SamplingConfiguration.java
Outdated
Show resolved
Hide resolved
...rc/test/java/org/elasticsearch/action/admin/indices/sampling/SamplingConfigurationTests.java
Show resolved
Hide resolved
...rc/test/java/org/elasticsearch/action/admin/indices/sampling/SamplingConfigurationTests.java
Show resolved
Hide resolved
…mpling/SamplingConfiguration.java Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Pinging @elastic/es-data-management (Team:Data Management) |
This PR modifies the max size limit on sampling configurations to be a function (1%) of a node's heap size. there is also a minimum default max size of 100kb.