Checksum enable fallback fixes for Spark 4.2 [databricks] - #15378
Conversation
|
build |
|
I think I need to add handing for this case:
The current code does this only once on startup. |
|
NOTE: release/26.08 has been created from main. Please retarget your PR to release/26.08 if it should be included in the release. |
I added special handling for the user flipping the configs at runtime. I tested this manually in a spark shell where I had either false defaults, true defaults for either config, and flipped them on and off and made sure the correct writer and reader were instantiated. |
Greptile SummaryThe PR fixes Spark 4.2 row-based checksum fallback behavior.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Register GPU shuffle] --> B[Resolve checksum settings]
B --> C{Checksum enabled?}
C -->|Yes| D[Store checksumFallback = true]
C -->|No| E[Store checksumFallback = false]
D --> F[Spark writer and reader]
E --> G[RAPIDS writer and reader]
Reviews (8): Last reviewed commit: "Fix the reader which was still using a d..." | Re-trigger Greptile |
Signed-off-by: Alessandro Bellina <abellina@nvidia.com>
…the checksum configs
49f0f90 to
ea07371
Compare
|
build |
|
build |
|
build |
1 similar comment
|
build |
| handle.dependency match { | ||
| case gpuDep: GpuShuffleDependency[_, _, _] | ||
| if gpuDep.useMultiThreadedShuffle && | ||
| !shouldFallThroughForShuffle && |
There was a problem hiding this comment.
[P1] Persist the fallback choice for multithreaded shuffles. registerShuffle deliberately leaves these on an unmarked BaseShuffleHandle, so this writer and the reader at line 2012 independently evaluate the task-local SQLConf. If a shuffle is reused after the configuration changes, or is otherwise observed under a different SQLConf, one side can choose the threaded RAPIDS implementation and the other Spark shuffle, producing missing output or fetch failures. Please record the registration-time choice per shuffle and use it for every writer and reader. The new suite fixes useMultiThreadedShuffle = false, so it does not cover this branch.
| } | ||
| } else { | ||
| // reset warning, so we warn again if the user re-enables it. | ||
| rowBasedChecksumFallbackLogged.compareAndSet(true, false) |
There was a problem hiding this comment.
[P2] This reset is global to the shuffle manager, not scoped to a session or query. With concurrent sessions, any task with checksums disabled resets the flag, and the next task from an enabled session logs again; alternating tasks can therefore emit this warning repeatedly. Please either make this a once-per-manager warning without resetting or scope the state to a shuffle/query.
There was a problem hiding this comment.
choosing the simpler: warn once for the lifetime of the manager. It seems unlikely users will flip between these configs at runtime.
| // SQLConf takes priority over SparkConf when explicitly set (e.g. SET command mid-session). | ||
| // SparkConf is checked next for values set at session start or via --conf. | ||
| // If neither is explicitly set, we fall back to Spark's registered config default via | ||
| // SQLConf.getConfString: on Spark 4.1.1+ both keys default to true (checksums on by |
There was a problem hiding this comment.
[P3] The version claim here is inaccurate: upstream Spark 4.1.0 and 4.1.1 default both checksum settings to false; they become true in Spark 4.2. Please change this to "Spark 4.2+". Because that default makes Spark 4.2 fall back to CPU shuffle unless both settings are disabled, please also document the performance impact and opt-out in user-facing docs or release notes.
|
build |
…hecksum flag in the gpu dependency
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
|
build |
|
@gerashegalov if you do have questions just let me know and I'll get another PR going. |
Fixes #14731
Description
The assertion in the issue #14731 is correct:
I find that in spark 4.2 that SparkConf does not get the SqlConf default, so we do need to check both, starting with the sql conf one. So we have to check. I added some helpers for the 4.1+ shim to deal with this and tests to show we fallback.
Checklists
Documentation
Testing
(Please provide the names of the existing tests in the PR description.)
Performance