[MINOR] Prevent timeline server from being reused in ITTestSchemaEvol…#8698
Merged
danny0405 merged 1 commit intoapache:masterfrom May 13, 2023
Merged
Conversation
Collaborator
Member
Author
|
Apologies, there was a JIRA issue that was created for this issue here: HUDI-6175 |
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.
…ution
Change Logs
Fix
org.apache.hudi.table.ITTestSchemaEvolutiontests that were failing with the following error:In
ITTestSchemaEvolution, multipleHoodieFlinkWriteClients are used for each stage of a single unit test. TheRemoteHoodieTableFileSystemViewfrom the previousWriteClientwill be closed after they are done performing their individual tasks of the same test.When the next stage of the same test is invoked, the new
HoodieFlinkWriteClientthat is created will attempt to reuse an EmbeddedTimelineServer that has already been stopped, causing the error shown above.Please refer to
org.apache.hudi.client.embedded.EmbeddedTimelineServerHelper#createEmbeddedTimelineServicefor logic on howEmbeddedTimelineServeris created.For a clearer flow of what is going on:
Let's refer to the code + stack trace above.
When
writeTableWithSchema1finishes, althoughawait()is called, await will only block until the insert the table is complete. Tearing down of the JM + TM is a non-blocking task.As such, the next function
changeTableSchemais invoked immediately prior to JM + TM's tear down is complete. Referring to the stack trace, one can see that the tear down is running whilechangeTableSchemais creating aFlinkWriteClient, which in turn creates a timeline service.Since tear down has not complete, the old embedded timeline server will be re-used.
Once tear down is complete,
changeTableSchemawill be using aFlinkWriteClientwith an embedded timeline server that has already been closed, causing the FLAKY integration tests (If teardown can complete fast enough,changeTableSchemawill create a new EmbeddedTimelineServer, else, connection failure + error)Impact
Describe any public API or user-facing feature change or any performance impact.
None, tests were fixed.
Risk level (write none, low medium or high below)
If medium or high, explain what verification was done to mitigate the risks.
None, tests were fixed.
Documentation Update
Describe any necessary documentation update if there is any new feature, config, or user-facing change
ticket number here and follow the instruction to make
changes to the website.
Contributor's checklist