-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
HIVE-23394: Fix Flaky TestJdbcGenericUDTFGetSplits2#testGenericUDTFOr… #4249
Conversation
The original ticket mentioned:
And the exception isn't test timeout but connection issue, I am not sure if by spliting the test into two parts is a good idea, Should try to solve keeping it together. May be by spliting we are avoiding the problem not solving... |
public void testGenericUDTFOrderBySplitCount1() throws Exception { | ||
super.testGenericUDTFOrderBySplitCount1("get_splits", new int[]{10, 1, 0, 2, 2, 2, 1, 10}); | ||
super.testGenericUDTFOrderBySplitCount1("get_splits", new int[] { 10, 5, 0 }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why some splits removed here? If the dataset is not the same, won't hide the actual issue?
public void testGenericUDTFOrderBySplitCount1() throws Exception { | ||
super.testGenericUDTFOrderBySplitCount1("get_llap_splits", new int[]{12, 3, 1, 4, 4, 4, 3, 12}); | ||
super.testGenericUDTFOrderBySplitCount1("get_llap_splits", new int[] { 12, 7, 1 }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
Thanks, @ayushtkn and @TuroczyX for the review. Looking at the stack trace mentioned in HIVE-23394 Looking at the tests , there are 2 tests that use AbstractTestJdbcGenericUDTFGetSplits:
These 2 tests call the same AbstractTestJdbcGenericUDTFGetSplits.java, which spins up a new miniHS2 instance. I think we should merge these 2 tests to a single file and ensure it runs sequentially to fix the flakiness.
|
That sounds like a bug in the RPC layer, two threads sharing HMSClient instance is same as two threads sharing FileSystem instances and invoking calls to server. The RPC layer should isolate those calls and shouldn't goof up. Every RPC AFAIK should be associated with RPC callId and ClientId, Atleast the Hadoop RPC layer does pass that. This should be easily reproducible then in a normal multithreading execution? |
Yes, the same issue was faced in multiple jiras. It's well described here as well. I think it should be fixed now by https://issues.apache.org/jira/browse/HIVE-10956 . I will check and see if i can still repro. |
…derBySplitCount1 and TestJdbcGenericUDTFGetSplits#testGenericUDTFOrderBySplitCount1
Hi Guys, The leaking thread has been fixed by this PR. #2967 The test we are enabling checks the following 2 udtfs: After enabling the test, since both the tests have similar code and I merged it into a single file to reduce code duplication. Also, because of the following 2 changes, the value of splits has changed. : 76f8182#diff-47b7f6f11c3aabbf6811b6d4d2e48162b68e4d9f30241b956e17b0d3960ec223 At the time these changes were made the test (testGenericUDTFOrderBySplitCount1) was ignored. So they didn’t update they only updated the splits here. But if we look at the testGenericUDTFOrderBySplitCount1OnPartitionedTable partition test in the same file, they have been updated. |
itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcGenericUDTFGetSplits.java
Outdated
Show resolved
Hide resolved
itests/hive-unit/src/test/java/org/apache/hive/jdbc/AbstractTestJdbcGenericUDTFGetSplits.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM +1, pending tests
Kudos, SonarCloud Quality Gate passed! |
Thanks @aturoczy , @deniskuzZ , @ayushtkn for the review! |
…OrderBySplitCount1 (Simhadri Govindappa, reviewed by Attila Turoczy, Ayush Saxena, Denys Kuzmenko) Closes apache#4249
…OrderBySplitCount1 (Simhadri Govindappa, reviewed by Attila Turoczy, Ayush Saxena, Denys Kuzmenko) Closes apache#4249
…derBySplitCount1 and TestJdbcGenericUDTFGetSplits#testGenericUDTFOrderBySplitCount1
What changes were proposed in this pull request?
Fix 2 flaky tests :
Why are the changes needed?
To get tests to pass we had to :
Does this PR introduce any user-facing change?
How was this patch tested?
Flaky check test: http://ci.hive.apache.org/job/hive-flaky-check/664/