-
Notifications
You must be signed in to change notification settings - Fork 312
Make rum injector stream/writer more resilient to errors #9184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 47 metrics, 12 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.52.0-SNAPSHOT~fca1f179a9, baseline=1.52.0-SNAPSHOT~2fe6aa2d23
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.044 s) : 0, 1044018
Total [baseline] (8.688 s) : 0, 8687566
Agent [candidate] (1.039 s) : 0, 1039138
Total [candidate] (8.617 s) : 0, 8616990
section iast
Agent [baseline] (1.186 s) : 0, 1185545
Total [baseline] (9.363 s) : 0, 9363009
Agent [candidate] (1.174 s) : 0, 1173796
Total [candidate] (9.393 s) : 0, 9392979
gantt
title insecure-bank - break down per module: candidate=1.52.0-SNAPSHOT~fca1f179a9, baseline=1.52.0-SNAPSHOT~2fe6aa2d23
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.441 ms) : 0, 1441
crashtracking [candidate] (1.457 ms) : 0, 1457
BytebuddyAgent [baseline] (733.943 ms) : 0, 733943
BytebuddyAgent [candidate] (730.249 ms) : 0, 730249
GlobalTracer [baseline] (242.243 ms) : 0, 242243
GlobalTracer [candidate] (241.161 ms) : 0, 241161
AppSec [baseline] (30.427 ms) : 0, 30427
AppSec [candidate] (30.477 ms) : 0, 30477
Debugger [baseline] (6.026 ms) : 0, 6026
Debugger [candidate] (6.036 ms) : 0, 6036
Remote Config [baseline] (645.242 µs) : 0, 645
Remote Config [candidate] (651.26 µs) : 0, 651
Telemetry [baseline] (8.241 ms) : 0, 8241
Telemetry [candidate] (8.221 ms) : 0, 8221
section iast
crashtracking [baseline] (1.446 ms) : 0, 1446
crashtracking [candidate] (1.436 ms) : 0, 1436
BytebuddyAgent [baseline] (856.278 ms) : 0, 856278
BytebuddyAgent [candidate] (847.642 ms) : 0, 847642
GlobalTracer [baseline] (233.391 ms) : 0, 233391
GlobalTracer [candidate] (230.898 ms) : 0, 230898
AppSec [baseline] (28.539 ms) : 0, 28539
AppSec [candidate] (28.494 ms) : 0, 28494
Debugger [baseline] (9.169 ms) : 0, 9169
Debugger [candidate] (5.85 ms) : 0, 5850
Remote Config [baseline] (599.936 µs) : 0, 600
Remote Config [candidate] (612.381 µs) : 0, 612
Telemetry [baseline] (8.093 ms) : 0, 8093
Telemetry [candidate] (8.055 ms) : 0, 8055
IAST [baseline] (27.084 ms) : 0, 27084
IAST [candidate] (30.031 ms) : 0, 30031
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.52.0-SNAPSHOT~fca1f179a9, baseline=1.52.0-SNAPSHOT~2fe6aa2d23
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.037 s) : 0, 1037272
Total [baseline] (10.728 s) : 0, 10727832
Agent [candidate] (1.048 s) : 0, 1047513
Total [candidate] (10.729 s) : 0, 10729240
section appsec
Agent [baseline] (1.22 s) : 0, 1219731
Total [baseline] (10.785 s) : 0, 10785010
Agent [candidate] (1.217 s) : 0, 1217202
Total [candidate] (10.783 s) : 0, 10783377
section iast
Agent [baseline] (1.191 s) : 0, 1190803
Total [baseline] (10.985 s) : 0, 10984914
Agent [candidate] (1.18 s) : 0, 1180174
Total [candidate] (10.933 s) : 0, 10932840
section profiling
Agent [baseline] (1.206 s) : 0, 1205518
Total [baseline] (10.971 s) : 0, 10970913
Agent [candidate] (1.184 s) : 0, 1184463
Total [candidate] (10.868 s) : 0, 10868354
gantt
title petclinic - break down per module: candidate=1.52.0-SNAPSHOT~fca1f179a9, baseline=1.52.0-SNAPSHOT~2fe6aa2d23
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.433 ms) : 0, 1433
crashtracking [candidate] (1.455 ms) : 0, 1455
BytebuddyAgent [baseline] (728.395 ms) : 0, 728395
BytebuddyAgent [candidate] (737.654 ms) : 0, 737654
GlobalTracer [baseline] (240.42 ms) : 0, 240420
GlobalTracer [candidate] (241.889 ms) : 0, 241889
AppSec [baseline] (30.403 ms) : 0, 30403
AppSec [candidate] (30.412 ms) : 0, 30412
Debugger [baseline] (6.035 ms) : 0, 6035
Debugger [candidate] (6.098 ms) : 0, 6098
Remote Config [baseline] (651.523 µs) : 0, 652
Remote Config [candidate] (649.988 µs) : 0, 650
Telemetry [baseline] (8.996 ms) : 0, 8996
Telemetry [candidate] (8.272 ms) : 0, 8272
section appsec
crashtracking [baseline] (1.442 ms) : 0, 1442
crashtracking [candidate] (1.44 ms) : 0, 1440
BytebuddyAgent [baseline] (754.921 ms) : 0, 754921
BytebuddyAgent [candidate] (752.464 ms) : 0, 752464
GlobalTracer [baseline] (233.345 ms) : 0, 233345
GlobalTracer [candidate] (233.35 ms) : 0, 233350
AppSec [baseline] (168.049 ms) : 0, 168049
AppSec [candidate] (169.301 ms) : 0, 169301
Debugger [baseline] (7.89 ms) : 0, 7890
Debugger [candidate] (7.168 ms) : 0, 7168
Remote Config [baseline] (602.165 µs) : 0, 602
Remote Config [candidate] (594.976 µs) : 0, 595
Telemetry [baseline] (8.767 ms) : 0, 8767
Telemetry [candidate] (8.045 ms) : 0, 8045
IAST [baseline] (23.412 ms) : 0, 23412
IAST [candidate] (23.601 ms) : 0, 23601
section iast
crashtracking [baseline] (1.459 ms) : 0, 1459
crashtracking [candidate] (1.457 ms) : 0, 1457
BytebuddyAgent [baseline] (860.868 ms) : 0, 860868
BytebuddyAgent [candidate] (852.562 ms) : 0, 852562
GlobalTracer [baseline] (233.746 ms) : 0, 233746
GlobalTracer [candidate] (232.082 ms) : 0, 232082
AppSec [baseline] (31.209 ms) : 0, 31209
AppSec [candidate] (30.74 ms) : 0, 30740
Debugger [baseline] (6.67 ms) : 0, 6670
Debugger [candidate] (7.532 ms) : 0, 7532
Remote Config [baseline] (594.861 µs) : 0, 595
Remote Config [candidate] (591.929 µs) : 0, 592
Telemetry [baseline] (8.031 ms) : 0, 8031
Telemetry [candidate] (8.018 ms) : 0, 8018
IAST [baseline] (27.044 ms) : 0, 27044
IAST [candidate] (26.057 ms) : 0, 26057
section profiling
crashtracking [baseline] (1.429 ms) : 0, 1429
crashtracking [candidate] (1.392 ms) : 0, 1392
BytebuddyAgent [baseline] (773.392 ms) : 0, 773392
BytebuddyAgent [candidate] (759.151 ms) : 0, 759151
GlobalTracer [baseline] (223.615 ms) : 0, 223615
GlobalTracer [candidate] (220.248 ms) : 0, 220248
AppSec [baseline] (30.984 ms) : 0, 30984
AppSec [candidate] (30.482 ms) : 0, 30482
Debugger [baseline] (6.41 ms) : 0, 6410
Debugger [candidate] (6.352 ms) : 0, 6352
Remote Config [baseline] (713.33 µs) : 0, 713
Remote Config [candidate] (669.014 µs) : 0, 669
Telemetry [baseline] (13.547 ms) : 0, 13547
Telemetry [candidate] (14.029 ms) : 0, 14029
ProfilingAgent [baseline] (106.094 ms) : 0, 106094
ProfilingAgent [candidate] (103.672 ms) : 0, 103672
Profiling [baseline] (106.118 ms) : 0, 106118
Profiling [candidate] (103.695 ms) : 0, 103695
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 5 performance regressions! Performance is the same for 6 metrics, 12 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.52.0-SNAPSHOT~fca1f179a9, baseline=1.52.0-SNAPSHOT~2fe6aa2d23
dateFormat X
axisFormat %s
section baseline
no_agent (37.025 ms) : 36731, 37320
. : milestone, 37025,
appsec (46.928 ms) : 46516, 47340
. : milestone, 46928,
code_origins (43.72 ms) : 43329, 44111
. : milestone, 43720,
iast (44.464 ms) : 44072, 44856
. : milestone, 44464,
profiling (48.162 ms) : 47713, 48611
. : milestone, 48162,
tracing (43.606 ms) : 43239, 43974
. : milestone, 43606,
section candidate
no_agent (37.872 ms) : 37574, 38171
. : milestone, 37872,
appsec (46.895 ms) : 46478, 47312
. : milestone, 46895,
code_origins (45.423 ms) : 45023, 45823
. : milestone, 45423,
iast (44.634 ms) : 44260, 45008
. : milestone, 44634,
profiling (47.617 ms) : 47140, 48094
. : milestone, 47617,
tracing (44.154 ms) : 43781, 44527
. : milestone, 44154,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.52.0-SNAPSHOT~fca1f179a9, baseline=1.52.0-SNAPSHOT~2fe6aa2d23
dateFormat X
axisFormat %s
section baseline
no_agent (4.269 ms) : 4221, 4317
. : milestone, 4269,
iast (9.57 ms) : 9413, 9728
. : milestone, 9570,
iast_FULL (13.391 ms) : 13130, 13651
. : milestone, 13391,
iast_GLOBAL (10.294 ms) : 10113, 10475
. : milestone, 10294,
profiling (8.446 ms) : 8310, 8582
. : milestone, 8446,
tracing (7.389 ms) : 7286, 7491
. : milestone, 7389,
section candidate
no_agent (4.447 ms) : 4397, 4497
. : milestone, 4447,
iast (9.179 ms) : 9029, 9329
. : milestone, 9179,
iast_FULL (13.96 ms) : 13682, 14238
. : milestone, 13960,
iast_GLOBAL (10.082 ms) : 9897, 10267
. : milestone, 10082,
profiling (8.864 ms) : 8721, 9008
. : milestone, 8864,
tracing (7.767 ms) : 7657, 7877
. : milestone, 7767,
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 biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.52.0-SNAPSHOT~fca1f179a9, baseline=1.52.0-SNAPSHOT~2fe6aa2d23
dateFormat X
axisFormat %s
section baseline
no_agent (15.324 s) : 15324000, 15324000
. : milestone, 15324000,
appsec (14.991 s) : 14991000, 14991000
. : milestone, 14991000,
iast (18.299 s) : 18299000, 18299000
. : milestone, 18299000,
iast_GLOBAL (18.065 s) : 18065000, 18065000
. : milestone, 18065000,
profiling (15.276 s) : 15276000, 15276000
. : milestone, 15276000,
tracing (14.816 s) : 14816000, 14816000
. : milestone, 14816000,
section candidate
no_agent (15.613 s) : 15613000, 15613000
. : milestone, 15613000,
appsec (14.825 s) : 14825000, 14825000
. : milestone, 14825000,
iast (18.766 s) : 18766000, 18766000
. : milestone, 18766000,
iast_GLOBAL (17.947 s) : 17947000, 17947000
. : milestone, 17947000,
profiling (15.918 s) : 15918000, 15918000
. : milestone, 15918000,
tracing (14.829 s) : 14829000, 14829000
. : milestone, 14829000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.52.0-SNAPSHOT~fca1f179a9, baseline=1.52.0-SNAPSHOT~2fe6aa2d23
dateFormat X
axisFormat %s
section baseline
no_agent (1.475 ms) : 1463, 1486
. : milestone, 1475,
appsec (2.449 ms) : 2396, 2501
. : milestone, 2449,
iast (2.196 ms) : 2133, 2259
. : milestone, 2196,
iast_GLOBAL (2.237 ms) : 2174, 2300
. : milestone, 2237,
profiling (2.056 ms) : 2005, 2108
. : milestone, 2056,
tracing (2.002 ms) : 1954, 2050
. : milestone, 2002,
section candidate
no_agent (1.48 ms) : 1468, 1492
. : milestone, 1480,
appsec (3.652 ms) : 3437, 3868
. : milestone, 3652,
iast (2.203 ms) : 2140, 2266
. : milestone, 2203,
iast_GLOBAL (2.23 ms) : 2168, 2293
. : milestone, 2230,
profiling (2.032 ms) : 1982, 2082
. : milestone, 2032,
tracing (2.022 ms) : 1973, 2071
. : milestone, 2022,
|
b1720e0
to
7e5f82a
Compare
boolean tmpFilter = filter; | ||
|
||
// will be reset if no errors after the following write | ||
filter = false; | ||
downstream.write(array, off + marker.length - 1, len - bulkWriteThreshold); | ||
filter = tmpFilter; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boolean tmpFilter = filter; | |
// will be reset if no errors after the following write | |
filter = false; | |
downstream.write(array, off + marker.length - 1, len - bulkWriteThreshold); | |
filter = tmpFilter; | |
boolean wasFiltering = filter; | |
// will be reset if no errors after the following write | |
filter = false; | |
downstream.write(array, off + marker.length - 1, len - bulkWriteThreshold); | |
filter = wasFiltering; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd also suggest replacing the other occurrences of tmpFilter
with wasFiltering
What Does This Do
Make
InjectingPipeOutStream
andInjectingPipeWriter
more deterministic when anIOException
is thrown by the downstream.In this particular case, the wrappers stop trying to inject to the downstream and just delegate the writes since the underlying buffer is now in an inconsistent state (we do not know in advance which portion of the buffer has been eventually written and what will be the retry policy of the user). This implies that eventually data can be corrupted or lost (but this would also have happened without this wrapper)
However, if the error arose when draining, the draining is resumed from the position that broke.
Motivation
Additional Notes
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]