Skip to content

Enforce limit on FTE max partition count#17876

Merged
losipiuk merged 1 commit intotrinodb:masterfrom
linzebing:force-limit-on-partition-count
Jun 15, 2023
Merged

Enforce limit on FTE max partition count#17876
losipiuk merged 1 commit intotrinodb:masterfrom
linzebing:force-limit-on-partition-count

Conversation

@linzebing
Copy link
Copy Markdown
Member

Description

To ensure the session property isn't accidentally set to an overwhelming number.

Additional context and related issues

N/A

Release notes

(x) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)

@linzebing linzebing requested a review from arhimondr June 13, 2023 14:50
@cla-bot cla-bot bot added the cla-signed label Jun 13, 2023
@linzebing linzebing requested a review from losipiuk June 13, 2023 14:50
@linzebing linzebing closed this Jun 13, 2023
@linzebing linzebing reopened this Jun 13, 2023
@linzebing linzebing force-pushed the force-limit-on-partition-count branch 2 times, most recently from f1599d1 to 937f98c Compare June 13, 2023 21:08
Copy link
Copy Markdown
Contributor

@arhimondr arhimondr left a comment

Choose a reason for hiding this comment

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

LGTM % questions

@linzebing linzebing force-pushed the force-limit-on-partition-count branch from 937f98c to 2432d6e Compare June 14, 2023 00:31
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: extract constant for 1000

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also I am not a big fan of hardcoding 1000. It is a bit arbitrary.
Probably it should be limitted to queryManagerConfig.getFaultTolerantExecutionMaxPartitionCount() and we would need an extra config parameter to set default value of session property.

But I do not feel to strongly about that.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's weird to have too many configs:) I don't see any similar configs like that, so I extract constant (similar to MAX_TASK_RETRY_ATTEMPTS)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There are some like that. But yeah - I agree this generates an explosion,.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

MAX_TASK_RETRY_ATTEMPTS is different animal. As with that you just set number of attempts. And here you specify FAULT_TOLERANT_EXECUTION_MAX_PARTITION_COUNT you specify number of partitions and 1000 hard coded limit on what you can set. There is no such hardcoded limit for MAX_TASK_RETRY_ATTEMPTS.

Let's leave 1000 in the code for now. We can revisit later if needed.

@linzebing linzebing force-pushed the force-limit-on-partition-count branch from 2432d6e to 85ec14e Compare June 15, 2023 18:52
@linzebing linzebing requested a review from losipiuk June 15, 2023 19:21
@losipiuk losipiuk merged commit 8aa48d8 into trinodb:master Jun 15, 2023
@github-actions github-actions bot added this to the 420 milestone Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants