fix: log shuffle-manager-missing warning once per session#4378
Draft
andygrove wants to merge 1 commit into
Draft
fix: log shuffle-manager-missing warning once per session#4378andygrove wants to merge 1 commit into
andygrove wants to merge 1 commit into
Conversation
isCometLoaded runs from every plan rule application, so the warning introduced in apache#4328 was emitted hundreds of times per Spark SQL test suite for sessions that never register CometShuffleManager. Track SQLConf identities in a synchronized weak set so the warning fires at most once per session. Refs apache#4377.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Refs #4377.
Rationale for this change
CometSparkSessionExtensions.isCometLoadedruns fromCometScanRule._applyandCometExecRule._apply, i.e. on every plan rule application. The warning added in #4328 therefore fires many times per query for any session that does not registerCometShuffleManager. In the Spark SQL CI matrix this surfaces as hundreds of duplicateWARNlines per affected suite (e.g.BroadcastJoinSuiteAEemitted ~304 in a single 4.1.1 run).Whether those suites should be running with the Comet shuffle manager is a separate question tracked in #4377. This PR addresses the log-spam side of the regression so the warning is still useful as a once-per-session signal.
What changes are included in this PR?
SQLConfinCometSparkSessionExtensions.isCometLoadednow only emits the warning the first time it observes a given session missing the shuffle manager. Entries are dropped when theSQLConfis GC'd, so this cannot grow unboundedly across test JVMs.How are these changes tested?
CometSparkSessionExtensionsSuite— bothisCometLoadedtests still pass (they assert boolean return values, which are unchanged).