hudi icon indicating copy to clipboard operation
hudi copied to clipboard

[HUDI-8370] Removed excessive `DataBucket::preWrite`

Open geserdugarov opened this issue 1 year ago • 1 comments

Change Logs

DataBucket::preWrite sets new current location, using fileID from DataBucket, only for first record in the bucket. But fileID is set only during DataBucket initialization, where we use passed first record. So, we actually don't need to call preWrite.

Impact

No impact

Risk level (write none, low medium or high below)

Low

Documentation Update

No need

Contributor's checklist

  • [x] Read through contributor's guide
  • [x] Change Logs and Impact were stated clearly
  • [x] Adequate tests were added if applicable
  • [x] CI passed

geserdugarov avatar Oct 15 '24 13:10 geserdugarov

CI report:

  • 953da4d1592ec741f44a237bc95384b0f96619c7 Azure: SUCCESS
Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

hudi-bot avatar Oct 15 '24 14:10 hudi-bot

@danny0405 , I've also reviewed lifecycle of current location for Flink stream write: 05 - Current location lifecycle for Flink We don't need to call preWrite(), it updates only fileID, which is similar for all records in the bucket. And each record has set current location.

geserdugarov avatar Oct 21 '24 07:10 geserdugarov