apache / apache/hudi

Calculation of 'stats wa' need to be modified

Open
#14,586 0 comments 0 reactions 0 assignees View on GitHub
component:cli from-jira priority:high type:bug
Dominant language
Java
Stars
6.2k
Forks
2.5k
Avg merge
2d 8h
Merged PRs (30d)
111

Description

'Write Amplification Factor' = 'Total Written' / 'Total Upserted' 

'Total Written' is always increase.

'Total Upserted' is not always increase. When the newest commit is insert new data,'Total Upserted' will be 0.

It leads the result are not in line with our understanding. 

 

if I insert 3 times, update 1 times, then insert again(10 rows per time)

'stats wa ' result as follows:

!image-2020-05-21-14-22-39-624.png!

 

'Total Written' need change to get the difference between adjacent commit.

I found that the numsWrites always increase. It's the reason of this.

 

I'll try to fix it.

 

 

## JIRA info

- Link: https://issues.apache.org/jira/browse/HUDI-917
- Type: Bug
- Attachment(s):
- 21/May/20 06:22;y_static_y;image-2020-05-21-14-22-39-624.png;https://issues.apache.org/jira/secure/attachment/13003610/image-2020-05-21-14-22-39-624.png

---

## Comments

18/May/22 10:33;StarBoy1005;Hello, which version of HUDI you used in this case?;;;

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file or test is named. Start by locating the stats wa calculation and numsWrites handling; compare adjacent-commit values in the reported insert/update sequence, and verify that the resulting Write Amplification Factor matches the intended per-commit calculation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering, stream-processing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.