Commit 86b3dc8
[Internal]Enabled Netty Buffer Leak detection and left-over CosmsoClient instance detection during test execution (Azure#47211)
* Test changes to add leak detection
* Update Configs.java
* Update CosmosNettyLeakDetectorFactory.java
* Update sdk/cosmos/azure-cosmos-encryption/src/test/java/com/azure/cosmos/encryption/CosmosNettyLeakDetectorFactory.java
Co-authored-by: Copilot <[email protected]>
* Update CosmosNettyLeakDetectorFactory.java
* Fixes
* Fixes
* Update CosmosNettyLeakDetectorFactory.java
* Update RxDocumentClientImpl.java
* Fixes
* Update CosmosNettyLeakDetectorFactory.java
* Fixes
* Fixes
* Iterating on tests
* Fixing build warning
* Fixing memory leak
* Reverting production changes
* Iterating on test tools
* Cleaning-up dummy QueryFeedRangeState properly
* Update test-resources.json
* Update sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosDiagnosticsE2ETest.java
Co-authored-by: Copilot <[email protected]>
* [WIP] Fix Netty buffer and RxDocumentClientImpl leaks (Azure#47213)
* Initial plan
* Improve JavaDoc phrasing in RxDocumentClientImpl
Co-authored-by: FabianMeiswinkel <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: FabianMeiswinkel <[email protected]>
Co-authored-by: Fabian Meiswinkel <[email protected]>
* NITs
* Move static block to class level in cosmos-encryption TestSuiteBase (Azure#47216)
* Initial plan
* Move CosmosNettyLeakDetectorFactory.ingestIntoNetty() to class-level static block
Co-authored-by: FabianMeiswinkel <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: FabianMeiswinkel <[email protected]>
* Update SessionTest.java
* Update tests.yml
* Update CosmosNettyLeakDetectorFactory.java
* Test config
* Update CosmosNettyLeakDetectorFactory.java
* Updating TestNG
* Reverting TestNG to 7.9.0 (highest version still supporting Java8)
* Switching back to TestNG 7.5.1
* Enabling leak detection in unit tests
* Iterating on tests
* Update pom.xml
* Test changes (Azure#47233)
* Update RntbdTransportClientTest.java
* Updating netty leak detection system properties
* Update CosmosNettyLeakDetectorFactory.java
* Test changes
* Prod memory leak fixes
* Test fixes
* Test fixes
* Users/fabianm/portfixes (Azure#47252)
* Update WebExceptionRetryPolicy.java
* Update ThinClientStoreModel.java
* Test fixes
* Fix Netty ByteBuf leaks in StoreResponse and RetryContextOnDiagnosticTest (Azure#47266)
* Initial plan
* Improve logging for ByteBufInputStream close failures
Change log level from debug to warn and catch Throwable instead of just IOException to make potential ByteBuf leak issues more visible.
Co-authored-by: FabianMeiswinkel <[email protected]>
* Fix ByteBuf leak in RetryContextOnDiagnosticTest
Changed from Mono.just() to Mono.fromCallable() to defer StoreResponse creation, ensuring ByteBuf lifecycle is properly managed within each subscription rather than eagerly at mock setup time.
Co-authored-by: FabianMeiswinkel <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: FabianMeiswinkel <[email protected]>
* Update EncryptionAsyncApiCrudTest.java
* Fix ByteBuf memory leak in TcpServerMock request decoders (Azure#47269)
* Initial plan
* Fix memory leak in ServerRntbdRequestDecoder and ServerRntbdContextRequestDecoder
When overriding channelRead() in ByteToMessageDecoder and bypassing the parent's
decode logic by calling context.fireChannelRead() directly, the ByteBuf reference
must be explicitly released to prevent memory leaks. Added ReferenceCountUtil.release()
in try-finally blocks to properly manage buffer lifecycle.
Co-authored-by: FabianMeiswinkel <[email protected]>
* Replace ReferenceCountUtil.release with safeRelease
* Replace ReferenceCountUtil.release with safeRelease
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: FabianMeiswinkel <[email protected]>
Co-authored-by: Fabian Meiswinkel <[email protected]>
* Update ThinClientStoreModel.java
* Fixing test issues
* Disable netty leak detection in RetrycontextOnDiagnosticTest
* Test and diagnostics improvements
* Test fixes and more breadcrumbs
* Test fixes
* Test fixes
* Test fixes
* Update OrderbyDocumentQueryTest.java
* Test fixes
* Reverting too noisy logs
* Test fixes
* Fixing POMs
* React to code review feedback
* Update pom.xml
* Addresses code review feedback
* Update sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdRequestDecoder.java
Co-authored-by: Annie Liang <[email protected]>
---------
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: FabianMeiswinkel <[email protected]>
Co-authored-by: Annie Liang <[email protected]>1 parent e758006 commit 86b3dc8
File tree
79 files changed
+3160
-1936
lines changed- sdk/cosmos
- azure-cosmos-benchmark
- src/main/java/com/azure/cosmos/benchmark
- azure-cosmos-encryption
- src/test/java/com/azure/cosmos/encryption
- azure-cosmos-kafka-connect
- azure-cosmos-spark-account-data-resolver-sample
- azure-cosmos-spark_3-3_2-12
- azure-cosmos-spark_3-4_2-12
- azure-cosmos-spark_3-5_2-12
- azure-cosmos-spark_3
- azure-cosmos-tests
- src/test/java/com/azure/cosmos
- faultinjection
- implementation
- cpu
- directconnectivity
- TcpServerMock/rntbd
- rntbd
- http
- rx
- changefeed/pkversion
- proxy
- azure-cosmos-test
- azure-cosmos
- src/main/java/com/azure/cosmos/implementation
- directconnectivity
- rntbd
- http
- fabric-cosmos-spark-auth_3
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
79 files changed
+3160
-1936
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
206 | 212 | | |
207 | 213 | | |
208 | 214 | | |
| |||
211 | 217 | | |
212 | 218 | | |
213 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
214 | 224 | | |
215 | 225 | | |
216 | 226 | | |
| |||
308 | 318 | | |
309 | 319 | | |
310 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
311 | 327 | | |
312 | 328 | | |
313 | 329 | | |
| |||
329 | 345 | | |
330 | 346 | | |
331 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
332 | 354 | | |
333 | 355 | | |
334 | 356 | | |
| |||
350 | 372 | | |
351 | 373 | | |
352 | 374 | | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
353 | 381 | | |
354 | 382 | | |
355 | 383 | | |
| |||
371 | 399 | | |
372 | 400 | | |
373 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
374 | 408 | | |
375 | 409 | | |
376 | 410 | | |
| |||
392 | 426 | | |
393 | 427 | | |
394 | 428 | | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
395 | 435 | | |
396 | 436 | | |
397 | 437 | | |
| |||
413 | 453 | | |
414 | 454 | | |
415 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
416 | 462 | | |
417 | 463 | | |
418 | 464 | | |
| |||
434 | 480 | | |
435 | 481 | | |
436 | 482 | | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
437 | 489 | | |
438 | 490 | | |
439 | 491 | | |
| |||
455 | 507 | | |
456 | 508 | | |
457 | 509 | | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
458 | 516 | | |
459 | 517 | | |
460 | 518 | | |
| |||
476 | 534 | | |
477 | 535 | | |
478 | 536 | | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
479 | 543 | | |
480 | 544 | | |
481 | 545 | | |
| |||
497 | 561 | | |
498 | 562 | | |
499 | 563 | | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
500 | 570 | | |
501 | 571 | | |
502 | 572 | | |
| |||
519 | 589 | | |
520 | 590 | | |
521 | 591 | | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
522 | 598 | | |
523 | 599 | | |
524 | 600 | | |
| |||
548 | 624 | | |
549 | 625 | | |
550 | 626 | | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
551 | 633 | | |
552 | 634 | | |
553 | 635 | | |
| |||
569 | 651 | | |
570 | 652 | | |
571 | 653 | | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
572 | 660 | | |
573 | 661 | | |
574 | 662 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
501 | 510 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| |||
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
220 | 228 | | |
221 | 229 | | |
222 | 230 | | |
| |||
225 | 233 | | |
226 | 234 | | |
227 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
228 | 240 | | |
229 | 241 | | |
230 | 242 | | |
| |||
263 | 275 | | |
264 | 276 | | |
265 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
266 | 284 | | |
267 | 285 | | |
268 | 286 | | |
| |||
284 | 302 | | |
285 | 303 | | |
286 | 304 | | |
287 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
288 | 311 | | |
289 | 312 | | |
290 | 313 | | |
| |||
Lines changed: 2 additions & 74 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
37 | | - | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | 55 | | |
128 | 56 | | |
129 | 57 | | |
| |||
0 commit comments