Commit 06425eb
Fix Netty ByteBuf leaks in StoreResponse and RetryContextOnDiagnosticTest (#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 <19165014+FabianMeiswinkel@users.noreply.github.com>
* 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 <19165014+FabianMeiswinkel@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: FabianMeiswinkel <19165014+FabianMeiswinkel@users.noreply.github.com>1 parent b008d62 commit 06425eb
File tree
2 files changed
+12
-18
lines changed- sdk/cosmos
- azure-cosmos-tests/src/test/java/com/azure/cosmos
- azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity
2 files changed
+12
-18
lines changedLines changed: 8 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | 108 | | |
110 | 109 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
117 | 114 | | |
118 | 115 | | |
119 | 116 | | |
| |||
156 | 153 | | |
157 | 154 | | |
158 | 155 | | |
159 | | - | |
160 | 156 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
167 | 161 | | |
168 | 162 | | |
169 | 163 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
| 74 | + | |
76 | 75 | | |
77 | 76 | | |
78 | | - | |
79 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
0 commit comments