Skip to content

Conversation

@ajithme
Copy link
Contributor

@ajithme ajithme commented Jan 7, 2020

What changes were proposed in this pull request?

There is a race condition in test case introduced in SPARK-30359 between reviveOffers in org.apache.spark.scheduler.TaskSchedulerImpl#submitTasks and org.apache.spark.scheduler.TaskSetManager#resourceOffer, in the testcase

No need to do resourceOffers as submitTask will revive offers from task set

Why are the changes needed?

Fix flaky test

Does this PR introduce any user-facing change?

No

How was this patch tested?

Test case can pass after the change

@ajithme
Copy link
Contributor Author

ajithme commented Jan 7, 2020

@ajithme ajithme changed the title [SPARK-30440] Flaky test: org.apache.spark.scheduler.TaskSetManagerSuite.reset [SPARK-30440] Flaky test: org.apache.spark.scheduler.TaskSetManagerSuite Jan 7, 2020
@ajithme
Copy link
Contributor Author

ajithme commented Jan 7, 2020

Updated with review comments. Please review cc @srowen @Ngone51 @cloud-fan

@srowen
Copy link
Member

srowen commented Jan 7, 2020

Jenkins test this please

@SparkQA
Copy link

SparkQA commented Jan 7, 2020

Test build #116248 has finished for PR 27115 at commit fc38c64.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • class FakeLongTasks(

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-30440] Flaky test: org.apache.spark.scheduler.TaskSetManagerSuite [SPARK-30440][CORE][TESTS] Flaky test: org.apache.spark.scheduler.TaskSetManagerSuite Jan 7, 2020
@ajithme
Copy link
Contributor Author

ajithme commented Jan 7, 2020

@dongjoon-hyun Updated as per comments, Please review

Use long running task to avoid completion mid test

Review Comments

Handle review comments
@ajithme
Copy link
Contributor Author

ajithme commented Jan 8, 2020

Updated as per comments. Please review @cloud-fan @dongjoon-hyun @srowen

@dongjoon-hyun
Copy link
Member

Retest this please.

@dongjoon-hyun
Copy link
Member

Retest this please

@SparkQA
Copy link

SparkQA commented Jan 8, 2020

Test build #116319 has finished for PR 27115 at commit b1099b9.

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

@SparkQA
Copy link

SparkQA commented Jan 8, 2020

Test build #116321 has finished for PR 27115 at commit b03d205.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • class FakeLongTasks(stageId: Int, partitionId: Int) extends FakeTask(stageId, partitionId)

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM. Merged to master.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-30440][CORE][TESTS] Flaky test: org.apache.spark.scheduler.TaskSetManagerSuite [SPARK-30440][CORE][TESTS] Avoid race condition in TaskSetManagerSuite by not using resourceOffer Jan 9, 2020
@HeartSaVioR
Copy link
Contributor

Thanks for the quick fix of flaky test!

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