Instrument QueryExecution.assertAnalyzed() to catch DataFrame analysis failures#11033
Open
aboitreaud wants to merge 2 commits intomasterfrom
Open
Instrument QueryExecution.assertAnalyzed() to catch DataFrame analysis failures#11033aboitreaud wants to merge 2 commits intomasterfrom
aboitreaud wants to merge 2 commits intomasterfrom
Conversation
ef61c95 to
4e5f33e
Compare
4e5f33e to
68ebce2
Compare
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 62 metrics, 9 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.62.0-SNAPSHOT~8d1a7c9059, baseline=1.62.0-SNAPSHOT~6880c80c48
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.058 s) : 0, 1058001
Total [baseline] (8.819 s) : 0, 8818753
Agent [candidate] (1.063 s) : 0, 1063470
Total [candidate] (8.794 s) : 0, 8794423
section iast
Agent [baseline] (1.236 s) : 0, 1236030
Total [baseline] (9.587 s) : 0, 9586701
Agent [candidate] (1.242 s) : 0, 1241808
Total [candidate] (9.547 s) : 0, 9546830
gantt
title insecure-bank - break down per module: candidate=1.62.0-SNAPSHOT~8d1a7c9059, baseline=1.62.0-SNAPSHOT~6880c80c48
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.247 ms) : 0, 1247
crashtracking [candidate] (1.235 ms) : 0, 1235
BytebuddyAgent [baseline] (633.307 ms) : 0, 633307
BytebuddyAgent [candidate] (637.401 ms) : 0, 637401
AgentMeter [baseline] (29.582 ms) : 0, 29582
AgentMeter [candidate] (29.762 ms) : 0, 29762
GlobalTracer [baseline] (248.503 ms) : 0, 248503
GlobalTracer [candidate] (249.869 ms) : 0, 249869
AppSec [baseline] (32.383 ms) : 0, 32383
AppSec [candidate] (32.621 ms) : 0, 32621
Debugger [baseline] (59.125 ms) : 0, 59125
Debugger [candidate] (59.447 ms) : 0, 59447
Remote Config [baseline] (606.349 µs) : 0, 606
Remote Config [candidate] (597.163 µs) : 0, 597
Telemetry [baseline] (8.027 ms) : 0, 8027
Telemetry [candidate] (8.084 ms) : 0, 8084
Flare Poller [baseline] (8.98 ms) : 0, 8980
Flare Poller [candidate] (8.242 ms) : 0, 8242
section iast
crashtracking [baseline] (1.219 ms) : 0, 1219
crashtracking [candidate] (1.234 ms) : 0, 1234
BytebuddyAgent [baseline] (812.456 ms) : 0, 812456
BytebuddyAgent [candidate] (816.889 ms) : 0, 816889
AgentMeter [baseline] (11.662 ms) : 0, 11662
AgentMeter [candidate] (11.553 ms) : 0, 11553
GlobalTracer [baseline] (239.942 ms) : 0, 239942
GlobalTracer [candidate] (240.724 ms) : 0, 240724
AppSec [baseline] (28.668 ms) : 0, 28668
AppSec [candidate] (27.236 ms) : 0, 27236
Debugger [baseline] (63.952 ms) : 0, 63952
Debugger [candidate] (65.966 ms) : 0, 65966
Remote Config [baseline] (535.615 µs) : 0, 536
Remote Config [candidate] (531.063 µs) : 0, 531
Telemetry [baseline] (7.802 ms) : 0, 7802
Telemetry [candidate] (7.784 ms) : 0, 7784
Flare Poller [baseline] (3.49 ms) : 0, 3490
Flare Poller [candidate] (3.46 ms) : 0, 3460
IAST [baseline] (30.338 ms) : 0, 30338
IAST [candidate] (30.324 ms) : 0, 30324
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.62.0-SNAPSHOT~8d1a7c9059, baseline=1.62.0-SNAPSHOT~6880c80c48
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.058 s) : 0, 1058308
Total [baseline] (11.11 s) : 0, 11110186
Agent [candidate] (1.057 s) : 0, 1056676
Total [candidate] (11.109 s) : 0, 11109021
section appsec
Agent [baseline] (1.256 s) : 0, 1255974
Total [baseline] (11.004 s) : 0, 11004284
Agent [candidate] (1.26 s) : 0, 1259977
Total [candidate] (11.063 s) : 0, 11062709
section iast
Agent [baseline] (1.24 s) : 0, 1239668
Total [baseline] (11.214 s) : 0, 11213848
Agent [candidate] (1.23 s) : 0, 1230175
Total [candidate] (11.341 s) : 0, 11340539
section profiling
Agent [baseline] (1.182 s) : 0, 1181544
Total [baseline] (10.891 s) : 0, 10891063
Agent [candidate] (1.183 s) : 0, 1182549
Total [candidate] (11.031 s) : 0, 11030650
gantt
title petclinic - break down per module: candidate=1.62.0-SNAPSHOT~8d1a7c9059, baseline=1.62.0-SNAPSHOT~6880c80c48
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.227 ms) : 0, 1227
crashtracking [candidate] (1.247 ms) : 0, 1247
BytebuddyAgent [baseline] (631.078 ms) : 0, 631078
BytebuddyAgent [candidate] (631.896 ms) : 0, 631896
AgentMeter [baseline] (29.496 ms) : 0, 29496
AgentMeter [candidate] (29.534 ms) : 0, 29534
GlobalTracer [baseline] (248.643 ms) : 0, 248643
GlobalTracer [candidate] (248.826 ms) : 0, 248826
AppSec [baseline] (32.612 ms) : 0, 32612
AppSec [candidate] (32.396 ms) : 0, 32396
Debugger [baseline] (60.398 ms) : 0, 60398
Debugger [candidate] (59.698 ms) : 0, 59698
Remote Config [baseline] (605.077 µs) : 0, 605
Remote Config [candidate] (591.564 µs) : 0, 592
Telemetry [baseline] (8.95 ms) : 0, 8950
Telemetry [candidate] (8.047 ms) : 0, 8047
Flare Poller [baseline] (9.136 ms) : 0, 9136
Flare Poller [candidate] (8.322 ms) : 0, 8322
section appsec
crashtracking [baseline] (1.216 ms) : 0, 1216
crashtracking [candidate] (1.218 ms) : 0, 1218
BytebuddyAgent [baseline] (671.071 ms) : 0, 671071
BytebuddyAgent [candidate] (673.536 ms) : 0, 673536
AgentMeter [baseline] (12.136 ms) : 0, 12136
AgentMeter [candidate] (12.121 ms) : 0, 12121
GlobalTracer [baseline] (247.9 ms) : 0, 247900
GlobalTracer [candidate] (248.738 ms) : 0, 248738
IAST [baseline] (24.222 ms) : 0, 24222
IAST [candidate] (24.278 ms) : 0, 24278
AppSec [baseline] (185.765 ms) : 0, 185765
AppSec [candidate] (186.233 ms) : 0, 186233
Debugger [baseline] (65.511 ms) : 0, 65511
Debugger [candidate] (65.634 ms) : 0, 65634
Remote Config [baseline] (568.615 µs) : 0, 569
Remote Config [candidate] (575.062 µs) : 0, 575
Telemetry [baseline] (7.856 ms) : 0, 7856
Telemetry [candidate] (7.911 ms) : 0, 7911
Flare Poller [baseline] (3.452 ms) : 0, 3452
Flare Poller [candidate] (3.462 ms) : 0, 3462
section iast
crashtracking [baseline] (1.228 ms) : 0, 1228
crashtracking [candidate] (1.225 ms) : 0, 1225
BytebuddyAgent [baseline] (817.279 ms) : 0, 817279
BytebuddyAgent [candidate] (807.929 ms) : 0, 807929
AgentMeter [baseline] (11.483 ms) : 0, 11483
AgentMeter [candidate] (11.403 ms) : 0, 11403
GlobalTracer [baseline] (238.461 ms) : 0, 238461
GlobalTracer [candidate] (238.79 ms) : 0, 238790
IAST [baseline] (28.917 ms) : 0, 28917
IAST [candidate] (29.892 ms) : 0, 29892
AppSec [baseline] (27.641 ms) : 0, 27641
AppSec [candidate] (28.424 ms) : 0, 28424
Debugger [baseline] (66.682 ms) : 0, 66682
Debugger [candidate] (64.819 ms) : 0, 64819
Remote Config [baseline] (534.618 µs) : 0, 535
Remote Config [candidate] (528.482 µs) : 0, 528
Telemetry [baseline] (7.77 ms) : 0, 7770
Telemetry [candidate] (7.782 ms) : 0, 7782
Flare Poller [baseline] (3.422 ms) : 0, 3422
Flare Poller [candidate] (3.417 ms) : 0, 3417
section profiling
crashtracking [baseline] (1.181 ms) : 0, 1181
crashtracking [candidate] (1.171 ms) : 0, 1171
BytebuddyAgent [baseline] (689.481 ms) : 0, 689481
BytebuddyAgent [candidate] (689.949 ms) : 0, 689949
AgentMeter [baseline] (9.2 ms) : 0, 9200
AgentMeter [candidate] (9.197 ms) : 0, 9197
GlobalTracer [baseline] (206.789 ms) : 0, 206789
GlobalTracer [candidate] (206.666 ms) : 0, 206666
AppSec [baseline] (32.664 ms) : 0, 32664
AppSec [candidate] (32.854 ms) : 0, 32854
Debugger [baseline] (65.583 ms) : 0, 65583
Debugger [candidate] (65.751 ms) : 0, 65751
Remote Config [baseline] (582.802 µs) : 0, 583
Remote Config [candidate] (582.294 µs) : 0, 582
Telemetry [baseline] (7.784 ms) : 0, 7784
Telemetry [candidate] (7.85 ms) : 0, 7850
Flare Poller [baseline] (3.573 ms) : 0, 3573
Flare Poller [candidate] (3.555 ms) : 0, 3555
ProfilingAgent [baseline] (93.644 ms) : 0, 93644
ProfilingAgent [candidate] (93.913 ms) : 0, 93913
Profiling [baseline] (94.205 ms) : 0, 94205
Profiling [candidate] (94.474 ms) : 0, 94474
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 20 metrics, 15 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~8d1a7c9059, baseline=1.62.0-SNAPSHOT~6880c80c48
dateFormat X
axisFormat %s
section baseline
no_agent (18.462 ms) : 18273, 18650
. : milestone, 18462,
appsec (19.521 ms) : 19322, 19721
. : milestone, 19521,
code_origins (17.751 ms) : 17576, 17925
. : milestone, 17751,
iast (19.445 ms) : 19247, 19643
. : milestone, 19445,
profiling (17.975 ms) : 17797, 18153
. : milestone, 17975,
tracing (17.731 ms) : 17557, 17906
. : milestone, 17731,
section candidate
no_agent (19.369 ms) : 19171, 19567
. : milestone, 19369,
appsec (19.001 ms) : 18807, 19195
. : milestone, 19001,
code_origins (18.117 ms) : 17939, 18296
. : milestone, 18117,
iast (18.111 ms) : 17933, 18290
. : milestone, 18111,
profiling (18.04 ms) : 17861, 18219
. : milestone, 18040,
tracing (18.032 ms) : 17855, 18209
. : milestone, 18032,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~8d1a7c9059, baseline=1.62.0-SNAPSHOT~6880c80c48
dateFormat X
axisFormat %s
section baseline
no_agent (1.263 ms) : 1250, 1276
. : milestone, 1263,
iast (3.35 ms) : 3301, 3398
. : milestone, 3350,
iast_FULL (6.066 ms) : 6004, 6127
. : milestone, 6066,
iast_GLOBAL (3.86 ms) : 3781, 3939
. : milestone, 3860,
profiling (2.21 ms) : 2190, 2230
. : milestone, 2210,
tracing (1.867 ms) : 1851, 1882
. : milestone, 1867,
section candidate
no_agent (1.245 ms) : 1232, 1257
. : milestone, 1245,
iast (3.299 ms) : 3253, 3345
. : milestone, 3299,
iast_FULL (5.904 ms) : 5845, 5963
. : milestone, 5904,
iast_GLOBAL (3.787 ms) : 3723, 3851
. : milestone, 3787,
profiling (2.215 ms) : 2194, 2235
. : milestone, 2215,
tracing (1.923 ms) : 1907, 1938
. : milestone, 1923,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~8d1a7c9059, baseline=1.62.0-SNAPSHOT~6880c80c48
dateFormat X
axisFormat %s
section baseline
no_agent (1.487 ms) : 1476, 1499
. : milestone, 1487,
appsec (3.749 ms) : 3532, 3965
. : milestone, 3749,
iast (2.281 ms) : 2211, 2351
. : milestone, 2281,
iast_GLOBAL (2.325 ms) : 2255, 2395
. : milestone, 2325,
profiling (2.095 ms) : 2040, 2149
. : milestone, 2095,
tracing (2.077 ms) : 2023, 2130
. : milestone, 2077,
section candidate
no_agent (1.487 ms) : 1475, 1498
. : milestone, 1487,
appsec (3.826 ms) : 3604, 4049
. : milestone, 3826,
iast (2.279 ms) : 2209, 2348
. : milestone, 2279,
iast_GLOBAL (2.315 ms) : 2245, 2385
. : milestone, 2315,
profiling (2.096 ms) : 2041, 2151
. : milestone, 2096,
tracing (2.082 ms) : 2028, 2135
. : milestone, 2082,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~8d1a7c9059, baseline=1.62.0-SNAPSHOT~6880c80c48
dateFormat X
axisFormat %s
section baseline
no_agent (15.528 s) : 15528000, 15528000
. : milestone, 15528000,
appsec (14.934 s) : 14934000, 14934000
. : milestone, 14934000,
iast (18.81 s) : 18810000, 18810000
. : milestone, 18810000,
iast_GLOBAL (18.118 s) : 18118000, 18118000
. : milestone, 18118000,
profiling (15.645 s) : 15645000, 15645000
. : milestone, 15645000,
tracing (14.696 s) : 14696000, 14696000
. : milestone, 14696000,
section candidate
no_agent (14.992 s) : 14992000, 14992000
. : milestone, 14992000,
appsec (14.924 s) : 14924000, 14924000
. : milestone, 14924000,
iast (18.822 s) : 18822000, 18822000
. : milestone, 18822000,
iast_GLOBAL (18.064 s) : 18064000, 18064000
. : milestone, 18064000,
profiling (14.957 s) : 14957000, 14957000
. : milestone, 14957000,
tracing (14.651 s) : 14651000, 14651000
. : milestone, 14651000,
|
68ebce2 to
8d1a7c9
Compare
Contributor
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
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.
What Does This Do
Adds instrumentation on
QueryExecution.assertAnalyzed()to catch Catalyst analysis failures from any entry point —SparkSession.sql(),Dataset.select(),Dataset.filter(), etc. Previously, onlySparkSession.sql()failures were caught (PR #10981), but customer failures through DataFrame API operations (df.select()) were invisible to the tracer.Also reverts the
lastSqlFailedreset removal from the original branch — a successful Spark job now resets bothlastJobFailedandlastSqlFailed, matching existing behavior and avoiding false positives for apps that catch and recover from SQL errors.Debug logging is intentionally included — this build is for customer validation, not merge.
Motivation
Customer BRE stderr logs showed
spark.applicationspan marked SUCCESS when the EMR step failed. TheAnalysisException(UNRESOLVED_COLUMN) was thrown fromDataset.select()→QueryExecution.assertAnalyzed(), a path not covered by the existingSparkSqlFailureAdviceonSparkSession.sql().Additional Notes
QueryExecution.assertAnalyzed()is stable (public void assertAnalyzed()) across Spark 3.5.x, 4.0.x, 4.1.xSparkSqlFailureAdviceonSparkSession.sql()is kept (redundant but harmless, cleanup later)sparkSession.range(1).toDF("id").select("nonexistent_column"))Jira ticket: [PROJ-IDENT]