Commit 9812d0b
Allow JIT killing of Raven.Embedded.EmbeddedServer by tearing it down as part of stop sequence (#4824)
* Teardown `Raven.Embedded.EmbeddedServer` as part of stop sequence so that we kill the instance if needed as adhering to cancellation is not possible in host builder root container dispose.
* Removed static
* Add why we set `GracefulShutdownTimeout` to Zero during dispose
* Enable Raven.Embedded console and file logging
* Set `GracefulShutdownTimeout` to 1 hour, as default is 30 seconds.
* Workaround for failing tests that seems to re-use the instance. Is that even supported?
* WaitForExitAsync is needed to wait for process to exit after kill signal
* Apply suggestions from Daniel's code review
Co-authored-by: Daniel Marbach <[email protected]>
* Ported disposing of RavenDB during stop to primary instance
* Dispose Process instance `using var`, ensure EmbeddedServer.Instance.Dispose always gets invoked, added comment and improved code readability
* Keep logging behavior default as it, only create client logs with LogMode.Information
* Update src/ServiceControl.RavenDB/EmbeddedDatabase.cs
* Update src/ServiceControl.Persistence.RavenDB/IRavenPersistenceLifecycle.cs
Co-authored-by: Mauro Servienti <[email protected]>
* Improved comments and cancellation behavior
* Fix comment
---------
Co-authored-by: Mauro Servienti <[email protected]>
Co-authored-by: Daniel Marbach <[email protected]>
Co-authored-by: Andreas Öhlund <[email protected]>1 parent 5b7b35a commit 9812d0b
File tree
9 files changed
+114
-8
lines changed- src
- ServiceControl.Audit.Persistence.RavenDB
- ServiceControl.Persistence.RavenDB
- ServiceControl.RavenDB
9 files changed
+114
-8
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
72 | 80 | | |
73 | 81 | | |
74 | 82 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
55 | 70 | | |
56 | 71 | | |
57 | 72 | | |
| |||
85 | 100 | | |
86 | 101 | | |
87 | 102 | | |
| 103 | + | |
88 | 104 | | |
89 | 105 | | |
90 | 106 | | |
| |||
162 | 178 | | |
163 | 179 | | |
164 | 180 | | |
165 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
166 | 185 | | |
167 | 186 | | |
168 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
169 | 246 | | |
170 | 247 | | |
171 | 248 | | |
172 | 249 | | |
173 | 250 | | |
174 | 251 | | |
175 | 252 | | |
176 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
177 | 257 | | |
178 | 258 | | |
179 | | - | |
180 | | - | |
181 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
182 | 270 | | |
183 | 271 | | |
184 | 272 | | |
| |||
213 | 301 | | |
214 | 302 | | |
215 | 303 | | |
| 304 | + | |
216 | 305 | | |
217 | 306 | | |
218 | 307 | | |
| |||
262 | 351 | | |
263 | 352 | | |
264 | 353 | | |
| 354 | + | |
265 | 355 | | |
266 | 356 | | |
267 | 357 | | |
268 | 358 | | |
269 | | - | |
| 359 | + | |
0 commit comments