Skip to content

Conversation

@han-yan01
Copy link
Contributor

Summary:
Reconciles Sapphire-Velox and Prestissimo configurations by cleaning up NativeExecutionSystemConfig.java. Removes production-related configs (memory management, spill, shuffle, etc.) that are now defined in configerator's native/config_properties.cinc. Keeps only test-specific configs (system memory pushback, experimental spiller path, etc.) in the Java class.

Rationale: Production configs belong in configerator for centralized configuration management. Java configs should only contain test-specific properties needed for local development and testing.

Release Notes

== NO RELEASE NOTE ==

Differential Revision: D85779158

@han-yan01 han-yan01 requested review from a team and shrinidhijoshi as code owners November 11, 2025 01:42
@prestodb-ci prestodb-ci added the from:Meta PR from Meta label Nov 11, 2025
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Nov 11, 2025

Reviewer's Guide

Refactors NativeExecutionSystemConfig to remove production-specific properties and centralize them in configerator, retains only test-specific configs (system memory pushback, experimental spiller path, etc.), and updates all tests and runtime code to reference the new string literals for these keys.

Class diagram for updated NativeExecutionSystemConfig

classDiagram
class NativeExecutionSystemConfig {
  +CONNECTOR_NUM_IO_THREADS_HW_MULTIPLIER : String
  +PRESTO_VERSION : String
  +SHUTDOWN_ONSET_SEC : String
  +SYSTEM_MEM_PUSHBACK_ENABLED : String
  +SYSTEM_MEM_PUSHBACK_ABORT_ENABLED : String
  +SYSTEM_MEM_LIMIT_GB : String
  +SYSTEM_MEM_SHRINK_GB : String
  +WORKER_OVERLOADED_THRESHOLD_MEM_GB : String
  +WORKER_OVERLOADED_THRESHOLD_CPU_PCT : String
  +EXPERIMENTAL_SPILLER_SPILL_PATH : String
  +ENABLE_OLD_TASK_CLEANUP : String
  +HTTP_SERVER_ENABLE_ACCESS_LOG : String
  +CORE_ON_ALLOCATION_FAILURE_ENABLED : String
  +REMOTE_FUNCTION_SERVER_THRIFT_UDS_PATH : String
  +REMOTE_FUNCTION_SERVER_SIGNATURE_FILES_DIRECTORY_PATH : String
  +REMOTE_FUNCTION_SERVER_SERDE : String
  -systemMemPushbackEnabledDefault : String
  -systemMemPushbackAbortEnabledDefault : String
  -systemMemLimitGbDefault : String
  -systemMemShrinkGbDefault : String
  -workerOverloadedThresholdMemGbDefault : String
  -workerOverloadedThresholdCpuPctDefault : String
  -experimentalSpillerSpillPathDefault : String
  -enableOldTaskCleanupDefault : String
  -httpServerEnableAccessLogDefault : String
  -coreOnAllocationFailureEnabledDefault : String
  -systemConfigs : Map<String, String>
  -defaultSystemConfigs : Map<String, String>
}
Loading

Class diagram for removed production config properties in NativeExecutionSystemConfig

classDiagram
class NativeExecutionSystemConfig {
  -SYSTEM_MEMORY_GB : String
  -QUERY_MEMORY_GB : String
  -QUERY_MAX_MEMORY_PER_NODE : String
  -USE_MMAP_ALLOCATOR : String
  -MEMORY_ARBITRATOR_KIND : String
  -SHARED_ARBITRATOR_RESERVED_CAPACITY : String
  -SHARED_ARBITRATOR_MEMORY_POOL_INITIAL_CAPACITY : String
  -SHARED_ARBITRATOR_MAX_MEMORY_ARBITRATION_TIME : String
  -TASK_MAX_DRIVERS_PER_TASK : String
  -SHUFFLE_NAME : String
  -SPILL_ENABLED : String
  -AGGREGATION_SPILL_ENABLED : String
  -JOIN_SPILL_ENABLED : String
  -ORDER_BY_SPILL_ENABLED : String
  -MAX_SPILL_BYTES : String
  -systemMemoryGbDefault : String
  -queryMemoryGbDefault : String
  -queryMaxMemoryPerNodeDefault : String
  -useMmapAllocatorDefault : String
  -memoryArbitratorKindDefault : String
  -sharedArbitratorReservedCapacityDefault : String
  -sharedArbitratorMemoryPoolInitialCapacityDefault : String
  -sharedArbitratorMaxMemoryArbitrationTimeDefault : String
  -taskMaxDriversPerTaskDefault : String
  -shuffleNameDefault : String
  -spillEnabledDefault : String
  -aggregationSpillEnabledDefault : String
  -joinSpillEnabledDefault : String
  -orderBySpillEnabledDefault : String
  -maxSpillBytesDefault : String
}
Loading

File-Level Changes

Change Details Files
Streamline NativeExecutionSystemConfig to test-only properties
  • Removed production-related static config constants and their default values (memory management, spill, shuffle, etc.)
  • Added test-only system memory pushback config constants and defaults
  • Updated defaultSystemConfigs builder to include only the new test-specific keys
presto-spark-base/src/main/java/com/facebook/presto/spark/execution/property/NativeExecutionSystemConfig.java
Update tests to use new literal config keys
  • Replaced assertions in TestNativeExecutionProcess to use string literals instead of removed static constants
  • Adjusted TestNativeExecutionSystemConfig expected configs map to include new keys
  • Modified systemConfigs.put calls in tests to use the string literal keys
presto-spark-base/src/test/java/com/facebook/presto/spark/execution/TestNativeExecutionProcess.java
presto-spark-base/src/test/java/com/facebook/presto/spark/execution/property/TestNativeExecutionSystemConfig.java
Adjust updateWorkerMemoryProperties method to new keys
  • Replaced get() calls that used removed static constants with string literals
  • Updated update() calls to use the new config key strings for system and query memory
  • Ensured consistent use of "system-memory-gb", "query-memory-gb", and "query.max-memory-per-node"
presto-spark-base/src/main/java/com/facebook/presto/spark/execution/nativeprocess/NativeExecutionProcess.java

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@han-yan01 han-yan01 changed the title [Sapphire Velox] presto side SV & Prestissimo config reconciliation [WIP][Sapphire Velox] presto side SV & Prestissimo config reconciliation Nov 11, 2025
…restodb#26576)

Summary:

Reconciles Sapphire-Velox and Prestissimo configurations by cleaning up `NativeExecutionSystemConfig.java`. Removes production-related configs (memory management, spill, shuffle, etc.) that are now defined in configerator's `native/config_properties.cinc`. Keeps only test-specific configs (system memory pushback, experimental spiller path, etc.) in the Java class.

**Rationale**: Production configs belong in configerator for centralized configuration management. Java configs should only contain test-specific properties needed for local development and testing.

# Release Notes
```
== NO RELEASE NOTE ==
```

Differential Revision: D85779158
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants