https://github.com/apache/spark
Revision 5001b9a1ce8305e1dce98998861abcf2cfffe3e8 authored by Mridul on 24 October 2022, 17:51:45 UTC, committed by Dongjoon Hyun on 24 October 2022, 17:51:55 UTC
### What changes were proposed in this pull request?

##### Quick submission of drivers in tests to mesos scheduler results in dropping drivers

Queued drivers in `MesosClusterScheduler` are ordered based on `MesosDriverDescription` - and the ordering used checks for priority (if different), followed by comparison of submission time.
For two driver submissions with same priority, if made in quick succession (such that submission time is same due to millisecond granularity of Date), this results in dropping the second `MesosDriverDescription` from `queuedDrivers` (since `driverOrdering` returns `0` when comparing the descriptions).

This PR fixes the more immediate issue with tests.

### Why are the changes needed?

Flakey tests, [see here](https://lists.apache.org/thread/jof098qxp0s6qqmt9qwv52f9665b1pjg) for an example.

### Does this PR introduce _any_ user-facing change?

No.
Fixing only tests for now - as mesos support is deprecated, not changing scheduler itself to address this.

### How was this patch tested?

Fixes unit tests

Closes #38378 from mridulm/fix_MesosClusterSchedulerSuite.

Authored-by: Mridul <mridulatgmail.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 60b1056307b3ee9d880a936f3a97c5fb16a2b698)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
1 parent a3a38ab
History
Tip revision: 5001b9a1ce8305e1dce98998861abcf2cfffe3e8 authored by Mridul on 24 October 2022, 17:51:45 UTC
[SPARK-40902][MESOS][TESTS] Fix issue with mesos tests failing due to quick submission of drivers
Tip revision: 5001b9a

README.md

back to top