-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[Native] Add local-exchange.max-partition-buffer-size system config #25578
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: master
Are you sure you want to change the base?
[Native] Add local-exchange.max-partition-buffer-size system config #25578
Conversation
ef1e4fc
to
a6f10f2
Compare
If this session property is being added to Prestissimo, then it should probably be added to the Presto C++ Session Properties documentation. |
Hi @steveburnett, this PR doesn't add max_local_exchange_partition_buffer_size as a session property. It makes this property tunable through the 'velox.properties' config file. I've updated the PR title and summary to be more accurate. (Please see bafb615 about the velox.properties config file.) |
a6f10f2
to
62a843a
Compare
62a843a
to
8873891
Compare
@kagamiori : We are generally not bringing new config from velox.properties these days and prefer to get from SystemConfig. Is it possible to do the same with this property as well ? |
Hi @aditi-pandit, I've updated it as a system config instead of velox.properties according to @kewang1024's suggestion. |
8873891
to
83043ba
Compare
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 @kagamiori. Please get review from @steveburnett as well.
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 for changing to using SystemConfig @kagamiori
Hi @steveburnett, I've updated this PR to make the new config a system config, and updated the presto-docs/src/main/sphinx/presto_cpp/properties.rst file. Thank you for the suggestion! |
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.
Sorry, just took another look, since we're deprecating velox.properties and only use config.properties, we shouldn't use updateLoadedValues
from BaseVeloxQueryConfig, instead we should use updateFromSystemConfigs
For testing, consider add an equivalent of BaseVeloxQueryConfigTest
for SystemConfig
{QueryConfig::kMaxLocalExchangePartitionBufferSize, | ||
systemConfig->capacityPropertyAsBytesString( | ||
SystemConfig::kMaxLocalExchangePartitionBufferSize)}, |
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.
Move this to
void updateFromSystemConfigs( |
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.
Hi @kewang1024, uint tests in QueryContextManagerTest.cpp only update session properties using protocol::SessionRepresentation
. How should I add a test case that updates system config there?
83043ba
to
9a4a97b
Compare
@@ -127,6 +127,8 @@ TEST_F(QueryContextManagerTest, defaultSessionProperties) { | |||
queryConfig.spillWriteBufferSize(), defaultQC->spillWriteBufferSize()); | |||
EXPECT_EQ( | |||
queryConfig.requestDataSizesMaxWaitSec(), defaultQC->requestDataSizesMaxWaitSec()); | |||
EXPECT_EQ( | |||
queryConfig.maxLocalExchangePartitionBufferSize(), defaultQC->maxLocalExchangePartitionBufferSize()); | |||
} | |||
|
|||
TEST_F(QueryContextManagerTest, overridingSessionProperties) { |
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.
You don't need the test on overriding session property
QueryContextManager will do the following
- get base map<string, string> from BaseVeloxQueryConfig (which comes from velox.properties which we will deprecate)
- update the session property value
updateFromSystemConfigs
9a4a97b
to
42ef635
Compare
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.
Thank you! @kagamiori
Hi @steveburnett, I've updated the document. Could you take another look? Thanks! |
Description
Expose the Velox max_local_exchange_partition_buffer_size query config as a system config local-exchange.max-partition-buffer-size to allow tuning.
Motivation and Context
Impact
Test Plan
Updated unit tests in BaseVeloxQueryConfigTest.cpp
Contributor checklist
Release Notes