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

Extend early dictionary assessment to all stripes #10131

Closed

Conversation

HuamengJiang
Copy link
Contributor

Summary:
Follow up diff to allow assessing dictionary early for all stripes.

Currently, this will cause continual invocation of abandonDictionaries for later stripes that are no-ops.

Differential Revision: D58396478

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 11, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D58396478

Copy link

netlify bot commented Jun 11, 2024

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 31a7586
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/6668f36032d9c000083bd0b1

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D58396478

HuamengJiang pushed a commit to HuamengJiang/velox-1 that referenced this pull request Jun 11, 2024
…10131)

Summary:
Pull Request resolved: facebookincubator#10131

Follow up diff to allow assessing dictionary early for all stripes.

Currently, this will cause continual invocation of abandonDictionaries for later stripes that are no-ops.

Differential Revision: D58396478
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D58396478

HuamengJiang pushed a commit to HuamengJiang/velox-1 that referenced this pull request Jun 11, 2024
…10131)

Summary:
Pull Request resolved: facebookincubator#10131

Follow up diff to allow assessing dictionary early for all stripes.

Currently, this will cause continual invocation of abandonDictionaries for later stripes that are no-ops.

Differential Revision: D58396478
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D58396478

HuamengJiang pushed a commit to HuamengJiang/velox-1 that referenced this pull request Jun 11, 2024
…10131)

Summary:
Pull Request resolved: facebookincubator#10131

Follow up diff to allow assessing dictionary early for all stripes.

Currently, this will cause continual invocation of abandonDictionaries for later stripes that are no-ops.

Differential Revision: D58396478
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D58396478

HuamengJiang pushed a commit to HuamengJiang/velox-1 that referenced this pull request Jun 11, 2024
…10131)

Summary:
Pull Request resolved: facebookincubator#10131

Follow up diff to allow assessing dictionary early for all stripes.

Currently, this will cause continual invocation of abandonDictionaries for later stripes that are no-ops.

Differential Revision: D58396478
Copy link
Contributor

@xiaoxmeng xiaoxmeng left a comment

Choose a reason for hiding this comment

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

@HuamengJiang LGTM. Thanks!

void DefaultFlushPolicy::setNextDictionaryCheckThreshold(
uint64_t stripeSizeEstimate) {
const auto increment =
stripeSizeThreshold_ / kNumDictionaryAssessmentsPerStripe;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a member say dictionaryCheckIncrement_? And

add VELOX_CHECK_GT(dictionaryCheckIncrement_, 0);

return FlushDecision::EVALUATE_DICTIONARY;
if (stripeIndex_ < stripeProgress.stripeIndex) {
dictionaryCheckThreshold_ = 0;
setNextDictionaryCheckThreshold();
Copy link
Contributor

Choose a reason for hiding this comment

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

SCOPE_EXIT{ setNextDictionaryCheckThreshold(stripeProgress.stripeSizeEstimate); };
if (stripeIndex_ < stripeProgress.stripeIndex) {
  setNextDictionaryCheckThreshold();
}
if (stripeProgress.stripeSizeEstimate >= dictionaryCheckThreshold_) {
  return FlushDecision::CHECK_DICTIONARY;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is more rigorous, but we only need to call it very rarely through the stripe instead of every batch written. I think of the current implementation as lazily incrementing the check threshold.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D58396478

HuamengJiang pushed a commit to HuamengJiang/velox-1 that referenced this pull request Jun 12, 2024
…10131)

Summary:
Pull Request resolved: facebookincubator#10131

Follow up diff to allow assessing dictionary early for all stripes.

Currently, this will cause continual invocation of abandonDictionaries for later stripes that are no-ops.

Reviewed By: xiaoxmeng

Differential Revision: D58396478
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D58396478

HuamengJiang pushed a commit to HuamengJiang/velox-1 that referenced this pull request Jun 12, 2024
…10131)

Summary:
Pull Request resolved: facebookincubator#10131

Follow up diff to allow assessing dictionary early for all stripes.

Currently, this will cause continual invocation of abandonDictionaries for later stripes that are no-ops.

Reviewed By: xiaoxmeng

Differential Revision: D58396478
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D58396478

HuamengJiang pushed a commit to HuamengJiang/velox-1 that referenced this pull request Jun 12, 2024
…10131)

Summary:
Pull Request resolved: facebookincubator#10131

Follow up diff to allow assessing dictionary early for all stripes.

Currently, this will cause continual invocation of abandonDictionaries for later stripes that are no-ops.

Reviewed By: xiaoxmeng

Differential Revision: D58396478
…10131)

Summary:
Pull Request resolved: facebookincubator#10131

Follow up diff to allow assessing dictionary early for all stripes.

Currently, this will cause continual invocation of abandonDictionaries for later stripes that are no-ops.

Reviewed By: xiaoxmeng

Differential Revision: D58396478
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D58396478

Copy link

stale bot commented Sep 10, 2024

This pull request has been automatically marked as stale because it has not had recent activity. If you'd still like this PR merged, please comment on the PR, make sure you've addressed reviewer comments, and rebase on the latest main. Thank you for your contributions!

@stale stale bot added the stale label Sep 10, 2024
@stale stale bot closed this Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants