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

[BUG] Dynamic partitions metric for insert into hive appears to be off #11326

Open
revans2 opened this issue Aug 14, 2024 · 4 comments
Open

[BUG] Dynamic partitions metric for insert into hive appears to be off #11326

revans2 opened this issue Aug 14, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@revans2
Copy link
Collaborator

revans2 commented Aug 14, 2024

Describe the bug
We recently saw a customer query where the number of dynamic partitions was 30,000 but the CPU had it at 20. I was not able to dig into the details of it, but it is clearly wrong, or our code is doing something very bad.

@revans2 revans2 added bug Something isn't working ? - Needs Triage Need team to review and classify labels Aug 14, 2024
@mattahrens
Copy link
Collaborator

@winningsix: can you give any more details about this scenario?

@winningsix
Copy link
Collaborator

@mattahrens We do see a case in one of customers logs. But it's still needed to understand its impact to the overall performance. So we may circle back this when performance impact confirmed.

cc @firestarman

@firestarman
Copy link
Collaborator

firestarman commented Aug 28, 2024

Better to have a repro case to understand what will happen here.
AFAIK, GPU has a different count algorithm for dynamic partitions from CPU. But I am not sure whether it is related.
CPU: Add the partition value to a Set, and get the Set size as the number of dynamic partitions.
GPU: Always increase the number by one after dectecting a different partition.

@jlowe
Copy link
Member

jlowe commented Aug 28, 2024

The GPU computation is incorrect -- it needs to match the CPU behavior. This is an existing Spark metric, we need to match the semantics of the metric if we're going to report it.

Note that the CPU is combining all of the reported partitions into a set on the driver, not within each task. I suspect the GPU is simply reporting partition counts per task, which means we're probably over counting partitions when multiple tasks end up writing to the same partition.

@mattahrens mattahrens removed the ? - Needs Triage Need team to review and classify label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants