Skip to content

Conversation

@lingbin
Copy link
Contributor

@lingbin lingbin commented Dec 15, 2025

In commit 74fb8ce, a separate thread pool(See
TaskServer::exchangeHttpCpuExecutor_) was introduced, replacing the
driver thread pool to process exchange requests. However, the name
driverExecutor_ is still being used in PrestoExchangeSource,
which is misleading.

This PR fixes this issue.

== NO RELEASE NOTE ==

In commit 74fb8ce, a separate thread pool(See
`TaskServer::exchangeHttpCpuExecutor_`) was introduced, replacing the
driver thread pool to process exchange requests. However, the name
`driverExecutor_` is still being used in `PrestoExchangeSource`,
which is misleading.

This PR fixes this issue.
@lingbin lingbin requested review from a team as code owners December 15, 2025 18:09
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 15, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Renames the PrestoExchangeSource executor field and all its usages from a misleading driverExecutor_ to the correct exchangeHttpCpuExecutor_ to reflect that exchange HTTP requests run on a dedicated thread pool, not the driver pool.

Updated class diagram for PrestoExchangeSource executor rename

classDiagram
class ExchangeSource

class PrestoExchangeSource {
  +PrestoExchangeSource(
    std::shared_ptr<http::HttpClient> httpClient,
    folly::CPUThreadPoolExecutor* exchangeHttpCpuExecutor,
    bool enableBufferCopy,
    bool immediateBufferTransfer
  )

  -bool enableBufferCopy_
  -bool immediateBufferTransfer_
  -folly::CPUThreadPoolExecutor* exchangeHttpCpuExecutor_
  -std::shared_ptr<http::HttpClient> httpClient_
  -RetryState dataRequestRetryState_
}

ExchangeSource <|-- PrestoExchangeSource
Loading

File-Level Changes

Change Details Files
Rename the PrestoExchangeSource executor member to reflect the dedicated exchange HTTP CPU executor and update all references.
  • Change constructor member initialization from driverExecutor_ to exchangeHttpCpuExecutor_ while still wiring the passed-in executor pointer
  • Update null-check macro to validate exchangeHttpCpuExecutor_ instead of driverExecutor_
  • Route all HTTP client .via(...) calls for data requests, acknowledgements, and aborts through exchangeHttpCpuExecutor_
  • Rename the folly::CPUThreadPoolExecutor* const member from driverExecutor_ to exchangeHttpCpuExecutor_ in the class definition
presto-native-execution/presto_cpp/main/PrestoExchangeSource.cpp
presto-native-execution/presto_cpp/main/PrestoExchangeSource.h

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 - here's some feedback:

  • Now that the member has been renamed to exchangeHttpCpuExecutor_, consider also renaming the constructor parameter (and any remaining references) from driverExecutor to something like exchangeHttpCpuExecutor for consistency and to avoid future confusion.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Now that the member has been renamed to `exchangeHttpCpuExecutor_`, consider also renaming the constructor parameter (and any remaining references) from `driverExecutor` to something like `exchangeHttpCpuExecutor` for consistency and to avoid future confusion.

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.

Copy link
Contributor

@aditi-pandit aditi-pandit left a comment

Choose a reason for hiding this comment

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

Thanks @lingbin for the code cleanup

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants