Skip to content

Commit

Permalink
[native] Deprecate the arbitration timeout name
Browse files Browse the repository at this point in the history
  • Loading branch information
tanjialiang committed Nov 19, 2024
1 parent 1fba459 commit 150c7eb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion presto-docs/src/main/sphinx/presto_cpp/properties.rst
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ The configuration properties of Presto C++ workers are described here, in alphab
The minimal memory capacity in bytes transferred between memory pools
during memory arbitration.

``shared-arbitrator.memory-reclaim-max-wait-time``
``shared-arbitrator.max-memory-arbitration-time``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

* **Type:** ``string``
Expand Down
4 changes: 2 additions & 2 deletions presto-native-execution/presto_cpp/main/PrestoServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -845,8 +845,8 @@ void PrestoServer::initializeVeloxMemory() {
systemConfig->sharedArbitratorMemoryPoolInitialCapacity()},
{std::string(SharedArbitratorConfig::kMemoryPoolReservedCapacity),
systemConfig->sharedArbitratorMemoryPoolReservedCapacity()},
{std::string(SharedArbitratorConfig::kMemoryReclaimMaxWaitTime),
systemConfig->sharedArbitratorMemoryReclaimWaitTime()},
{std::string(SharedArbitratorConfig::kMaxMemoryArbitrationTime),
systemConfig->sharedArbitratorMaxMemoryArbitrationTime()},
{std::string(SharedArbitratorConfig::kMemoryPoolMinFreeCapacity),
systemConfig->sharedArbitratorMemoryPoolMinFreeCapacity()},
{std::string(SharedArbitratorConfig::kMemoryPoolMinFreeCapacityPct),
Expand Down
10 changes: 5 additions & 5 deletions presto-native-execution/presto_cpp/main/common/Configs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ SystemConfig::SystemConfig() {
STR_PROP(kSharedArbitratorReservedCapacity, "4GB"),
STR_PROP(kSharedArbitratorMemoryPoolInitialCapacity, "128MB"),
STR_PROP(kSharedArbitratorMemoryPoolReservedCapacity, "64MB"),
STR_PROP(kSharedArbitratorMemoryReclaimMaxWaitTime, "5m"),
STR_PROP(kSharedArbitratorMaxMemoryArbitrationTime, "5m"),
STR_PROP(kSharedArbitratorGlobalArbitrationEnabled, "false"),
NUM_PROP(kLargestSizeClassPages, 256),
BOOL_PROP(kEnableVeloxTaskLogging, false),
Expand Down Expand Up @@ -562,12 +562,12 @@ std::string SystemConfig::sharedArbitratorMemoryPoolReservedCapacity() const {
std::string(kSharedArbitratorMemoryPoolReservedCapacityDefault));
}

std::string SystemConfig::sharedArbitratorMemoryReclaimWaitTime() const {
std::string SystemConfig::sharedArbitratorMaxMemoryArbitrationTime() const {
static constexpr std::string_view
kSharedArbitratorMemoryReclaimMaxWaitTimeDefault = "5m";
kSharedArbitratorMaxMemoryArbitrationTimeDefault = "5m";
return optionalProperty<std::string>(
kSharedArbitratorMemoryReclaimMaxWaitTime)
.value_or(std::string(kSharedArbitratorMemoryReclaimMaxWaitTimeDefault));
kSharedArbitratorMaxMemoryArbitrationTime)
.value_or(std::string(kSharedArbitratorMaxMemoryArbitrationTimeDefault));
}

std::string SystemConfig::sharedArbitratorFastExponentialGrowthCapacityLimit()
Expand Down
6 changes: 3 additions & 3 deletions presto-native-execution/presto_cpp/main/common/Configs.h
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@ class SystemConfig : public ConfigBase {
/// Specifies the max time to wait for memory reclaim by arbitration. The
/// memory reclaim might fail if the max wait time has exceeded. If it is
/// zero, then there is no timeout.
static constexpr std::string_view kSharedArbitratorMemoryReclaimMaxWaitTime{
"shared-arbitrator.memory-reclaim-max-wait-time"};
static constexpr std::string_view kSharedArbitratorMaxMemoryArbitrationTime{
"shared-arbitrator.max-memory-arbitration-time"};

/// When shared arbitrator grows memory pool's capacity, the growth bytes will
/// be adjusted in the following way:
Expand Down Expand Up @@ -792,7 +792,7 @@ class SystemConfig : public ConfigBase {

std::string sharedArbitratorMemoryPoolReservedCapacity() const;

std::string sharedArbitratorMemoryReclaimWaitTime() const;
std::string sharedArbitratorMaxMemoryArbitrationTime() const;

std::string sharedArbitratorMemoryPoolInitialCapacity() const;

Expand Down

0 comments on commit 150c7eb

Please sign in to comment.