-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit 141ee1e
Fix Netty reference leak. (#1762)
* Fix Netty reference leak.
Fixes netty byte buffer releases in edge case scenarios:
- Ensure async select server uses a callback if the cluster had been closed
- Ensure that handleReadResponse checks to see if the cluster had been closed
before retaining incoming buffers
- Ensure closing the netty stream releases all references
Test fixes
- Ensure tests run using paranoid leak detection
- Fail the testsuite if a leak is detected.
- Fixed releasing buffers in the ByteBufferBsonOutputTest.
JAVA-5901
Co-authored-by: Viacheslav Babanin <slav.babanin@mongodb.com>1 parent a3c3857 commit 141ee1e
File tree
8 files changed
+44
-13
lines changed- .evergreen
- buildSrc/src/main/kotlin/conventions
- driver-core/src
- main/com/mongodb/internal/connection
- netty
- test/unit/com/mongodb/internal/connection
- driver-reactive-streams/src/main/com/mongodb/reactivestreams/client/internal
8 files changed
+44
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | - | ||
135 | + | ||
136 | + | ||
137 | + | ||
138 | + | ||
139 | + | ||
140 | + | ||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | + | ||
38 | + | ||
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | - | ||
186 | + | ||
187 | + | ||
188 | + | ||
187 | 189 | | |
188 | 190 | | |
189 | 191 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | - | ||
79 | 78 | | |
79 | + | ||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
358 | - | ||
358 | + | ||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | - | ||
259 | + | ||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| |||
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | - | ||
311 | - | ||
310 | + | ||
312 | 311 | | |
313 | 312 | | |
314 | 313 | | |
| |||
349 | 348 | | |
350 | 349 | | |
351 | 350 | | |
352 | - | ||
351 | + | ||
352 | + | ||
353 | + | ||
354 | + | ||
355 | + | ||
353 | 356 | | |
354 | 357 | | |
355 | 358 | | |
| |||
378 | 381 | | |
379 | 382 | | |
380 | 383 | | |
381 | - | ||
384 | + | ||
385 | + | ||
386 | + | ||
382 | 387 | | |
383 | 388 | | |
384 | 389 | | |
| |||
Lines changed: 18 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
498 | + | ||
498 | 499 | | |
499 | 500 | | |
500 | 501 | | |
| |||
504 | 505 | | |
505 | 506 | | |
506 | 507 | | |
507 | - | ||
508 | + | ||
509 | + | ||
510 | + | ||
511 | + | ||
512 | + | ||
508 | 513 | | |
509 | 514 | | |
510 | 515 | | |
| |||
1017 | 1022 | | |
1018 | 1023 | | |
1019 | 1024 | | |
1025 | + | ||
1020 | 1026 | | |
1021 | 1027 | | |
1022 | 1028 | | |
| |||
1028 | 1034 | | |
1029 | 1035 | | |
1030 | 1036 | | |
1031 | - | ||
1037 | + | ||
1032 | 1038 | | |
1033 | 1039 | | |
1034 | 1040 | | |
1035 | 1041 | | |
1036 | 1042 | | |
1043 | + | ||
1044 | + | ||
1037 | 1045 | | |
1038 | 1046 | | |
1039 | 1047 | | |
| |||
1049 | 1057 | | |
1050 | 1058 | | |
1051 | 1059 | | |
1060 | + | ||
1052 | 1061 | | |
1053 | 1062 | | |
1054 | 1063 | | |
| |||
1060 | 1069 | | |
1061 | 1070 | | |
1062 | 1071 | | |
1063 | - | ||
1072 | + | ||
1064 | 1073 | | |
1065 | 1074 | | |
1066 | 1075 | | |
1067 | 1076 | | |
1068 | 1077 | | |
1078 | + | ||
1079 | + | ||
1069 | 1080 | | |
1070 | 1081 | | |
1071 | 1082 | | |
| |||
1081 | 1092 | | |
1082 | 1093 | | |
1083 | 1094 | | |
1095 | + | ||
1084 | 1096 | | |
1085 | 1097 | | |
1086 | 1098 | | |
| |||
1092 | 1104 | | |
1093 | 1105 | | |
1094 | 1106 | | |
1095 | - | ||
1107 | + | ||
1096 | 1108 | | |
1097 | 1109 | | |
1098 | 1110 | | |
1099 | 1111 | | |
1100 | 1112 | | |
1113 | + | ||
1114 | + | ||
1101 | 1115 | | |
1102 | 1116 | | |
1103 | 1117 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | + | ||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
77 | + | ||
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
114 | + | ||
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
| |||
0 commit comments