Skip to content
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

[native] cache.no_retention should also be false when hive.node_selection_strategy=HARD_AFFINITY #24147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

minhancao
Copy link
Contributor

@minhancao minhancao commented Nov 26, 2024

Description

Previous PR below allows setting hive.node_selection_strategy=SOFT_AFFINITY to set cache.no_retention=FALSE.
#24076

This PR adds setting hive.node_selection_strategy=HARD_AFFINITY will set cache.no_retention=FALSE as well.

Motivation and Context

Impact

Test Plan

Contributor checklist

  • Please make sure your submission complies with our development, formatting, commit message, and attribution guidelines.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== NO RELEASE NOTE ==

@minhancao minhancao self-assigned this Nov 26, 2024
@minhancao minhancao requested a review from a team as a code owner November 26, 2024 00:38
@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Nov 26, 2024
@prestodb-ci prestodb-ci requested review from a team, sh-shamsan and czentgr and removed request for a team November 26, 2024 00:38
Copy link
Contributor

@yingsu00 yingsu00 left a comment

Choose a reason for hiding this comment

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

@minhancao Can you please clean up the release note section?

yingsu00
yingsu00 previously approved these changes Nov 26, 2024
@@ -117,7 +117,9 @@ void updateVeloxConnectorConfigs(
auto it = connectorConfig.find("node_selection_strategy");
if (it != connectorConfig.end()) {
connectorConfig[connector::hive::HiveConfig::kCacheNoRetentionSession] =
it->second == "SOFT_AFFINITY" ? "false" : "true";
(it->second == "SOFT_AFFINITY" || it->second == "HARD_AFFINITY")
Copy link
Contributor

Choose a reason for hiding this comment

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

how about it->second != "SOFT_AFFINITY" && it->second != "HARD_AFFINITY"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changing logic to:

connectorConfig[connector::hive::HiveConfig::kCacheNoRetentionSession] =
    (it->second != "SOFT_AFFINITY" && it->second != "HARD_AFFINITY") ? "true" : "false";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from:IBM PR from IBM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants