Skip to content

Conversation

@gengliangwang
Copy link
Member

@gengliangwang gengliangwang commented Jun 1, 2021

What changes were proposed in this pull request?

A test case of AdaptiveQueryExecSuite becomes flaky since there are too many debug logs in RootLogger:
https://github.com/Yikun/spark/runs/2715222392?check_suite_focus=true
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/139125/testReport/

To fix it, I suggest supporting multiple loggers in the testing method withLogAppender. So that the LogAppender gets clean target log outputs.

Why are the changes needed?

Fix a flaky test case.
Also, reduce unnecessary memory cost in tests.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Unit test

@github-actions github-actions bot added the SQL label Jun 1, 2021
@gengliangwang gengliangwang changed the title [SPARK-33933][FollowUp][SQL] [SPARK-33933][FollowUp][SQL] Fix a flaky test case in AdaptiveQueryExecSuite Jun 1, 2021
@HyukjinKwon HyukjinKwon changed the title [SPARK-33933][FollowUp][SQL] Fix a flaky test case in AdaptiveQueryExecSuite [SPARK-33933][FOLLOW-UP][SQL] Fix a flaky test case in AdaptiveQueryExecSuite Jun 1, 2021
@SparkQA
Copy link

SparkQA commented Jun 1, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43656/

@SparkQA
Copy link

SparkQA commented Jun 1, 2021

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43656/

@SparkQA
Copy link

SparkQA commented Jun 1, 2021

Test build #139137 has finished for PR 32725 at commit f890295.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Member

@srowen srowen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed AQE tests timing out after stalling for hours in another PR - could be related

val restoreLevels = loggers.map(_.getLevel)
loggers.foreach { logger =>
logger.addAppender(appender)
if (level.isDefined) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be level.foreach in both places, but doesn't matter

@gengliangwang gengliangwang changed the title [SPARK-33933][FOLLOW-UP][SQL] Fix a flaky test case in AdaptiveQueryExecSuite [SPARK-35595][TESTS] Support multiple loggers in testing method withLogAppender Jun 1, 2021
@github-actions github-actions bot added the CORE label Jun 1, 2021
@gengliangwang
Copy link
Member Author

I noticed AQE tests timing out after stalling for hours in another PR - could be related

Yes the logger appending can be slow

@gengliangwang
Copy link
Member Author

@HyukjinKwon @cloud-fan @MaxGekk @zhongyu09 I use a better approach and update the PR. Please take a look if you are interested.
We should encourage developers to use specific loggers during code review.

@cloud-fan
Copy link
Contributor

This is a good improvement! Do we still need to set the size to 10000?

@gengliangwang
Copy link
Member Author

This is a good improvement! Do we still need to set the size to 10000?

Do you mean the default 1000 limit?
We can keep it so that if it is hit we should enhance the problematic test case.

@SparkQA
Copy link

SparkQA commented Jun 1, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43681/

@SparkQA
Copy link

SparkQA commented Jun 1, 2021

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43681/

@SparkQA
Copy link

SparkQA commented Jun 1, 2021

Test build #139161 has finished for PR 32725 at commit 620a8ba.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 1, 2021

Kubernetes integration test unable to build dist.

exiting with code: 1
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43697/

@SparkQA
Copy link

SparkQA commented Jun 1, 2021

Test build #139178 has finished for PR 32725 at commit 4de337e.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gengliangwang
Copy link
Member Author

Thanks for the reviews, merging to master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants