Commit d9d54c7
Fix DRSM nil pointer crashes in distributed deployments (#197)
* drsm: fix nil pointer crashes in change stream handler
Add defensive nil checks to prevent crashes when processing MongoDB
change stream events in distributed deployments.
Fixes three crash scenarios:
1. Empty owner field - skip to prevent resource leaks
2. Nil chunk pointer - chunk not yet in global table (out-of-order events)
3. Nil pod pointer - pod not yet registered locally
Skip invalid updates with warning logs rather than crashing. Eventual
consistency maintained by periodic checkAllChunks() resync (3 seconds).
Tested with multiple instances during pod failures and
network partitions.
Signed-off-by: Edvin Lindqvist <[email protected]>
* simplified owner check and centralized podChunks verification/initialization
Co-authored-by: Arrobo, Gabriel <[email protected]>
Signed-off-by: Edvin Lindqvist <[email protected]>
* Stepped up version
Signed-off-by: Edvin Lindqvist <[email protected]>
---------
Signed-off-by: Edvin Lindqvist <[email protected]>
Co-authored-by: Edvin Lindqvist <[email protected]>
Co-authored-by: Arrobo, Gabriel <[email protected]>1 parent 0960089 commit d9d54c7
2 files changed
+26
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
113 | 119 | | |
114 | 120 | | |
115 | 121 | | |
| |||
154 | 160 | | |
155 | 161 | | |
156 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
157 | 167 | | |
158 | 168 | | |
159 | 169 | | |
160 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
161 | 177 | | |
162 | 178 | | |
163 | 179 | | |
164 | 180 | | |
165 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
166 | 189 | | |
167 | 190 | | |
168 | 191 | | |
| |||
270 | 293 | | |
271 | 294 | | |
272 | 295 | | |
273 | | - | |
| 296 | + | |
274 | 297 | | |
275 | 298 | | |
276 | 299 | | |
| |||
0 commit comments