[HUDI-8410] Fix a flaky test for partition stats#12146
Merged
codope merged 2 commits intoapache:masterfrom Nov 11, 2024
Merged
Conversation
fdb177b to
fad662d
Compare
yihua
reviewed
Oct 23, 2024
| import org.apache.hudi.client.transaction.lock.InProcessLockProvider | ||
| import org.apache.hudi.common.config.HoodieMetadataConfig | ||
| import org.apache.hudi.common.model.{FileSlice, HoodieBaseFile, HoodieCommitMetadata, HoodieFailedWritesCleaningPolicy, HoodieTableType, WriteConcurrencyMode, WriteOperationType} | ||
| import org.apache.hudi.common.model._ |
Contributor
There was a problem hiding this comment.
Avoid using _ unless there are more than 20 entries
| import org.apache.hudi.common.table.timeline.HoodieInstant | ||
| import org.apache.hudi.common.testutils.RawTripTestPayload.recordsToStrings | ||
| import org.apache.hudi.config.{HoodieCleanConfig, HoodieClusteringConfig, HoodieCompactionConfig, HoodieLockConfig, HoodieWriteConfig} | ||
| import org.apache.hudi.config._ |
| latestBatchDf | ||
| } | ||
|
|
||
| protected def doWriteAndValidateDataAndPartitionStats(records: mutable.Buffer[String], |
Contributor
There was a problem hiding this comment.
Can this be reused by the method above to avoid code duplication?
Collaborator
Author
There was a problem hiding this comment.
Yeah. refactored.
| ) | ||
|
|
||
| doWriteAndValidateDataAndPartitionStats(hudiOpts, | ||
| val firstBatch: mutable.Buffer[String] = |
Contributor
There was a problem hiding this comment.
Suggested change
| val firstBatch: mutable.Buffer[String] = | |
| val insertRecords: mutable.Buffer[String] = |
| saveMode = SaveMode.Overwrite, | ||
| validate = false) | ||
|
|
||
| val latestBatch1: mutable.Buffer[String] = firstBatch |
Contributor
There was a problem hiding this comment.
Suggested change
| val latestBatch1: mutable.Buffer[String] = firstBatch | |
| val writer1Records: mutable.Buffer[String] = firstBatch |
| validate = false) | ||
|
|
||
| val latestBatch1: mutable.Buffer[String] = firstBatch | ||
| val latestBatch2: mutable.Buffer[String] = |
Contributor
There was a problem hiding this comment.
Suggested change
| val latestBatch2: mutable.Buffer[String] = | |
| val writer2Records: mutable.Buffer[String] = |
fad662d to
fb99dbd
Compare
fb99dbd to
b9f9a63
Compare
Collaborator
wombatu-kun
approved these changes
Nov 5, 2024
codope
approved these changes
Nov 11, 2024
usberkeley
pushed a commit
to usberkeley/hudi
that referenced
this pull request
Nov 13, 2024
* [HUDI-8410] Fix the bug * address comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Logs
When we expected there is a conflict between two upserts, which may not happen since the these two commits may not update existing records.
Created a function to take in records to ensure the conflict happens.
Impact
Less flaky.
Risk level (write none, low medium or high below)
Low.
Documentation Update
Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none".
ticket number here and follow the instruction to make
changes to the website.
Contributor's checklist