Commit 8502e5b
authored
Use InMemoryNoOpCommitDirectory for archives indices only (#121210)
Since #118606 searchable snapshots shards are not expected to
write files on disk, with the exception of archives indices mounted
as searchable snapshots which require to rewrite the segment infos
file in a newer version.
Ideally we should be able to remove the usage of the
InMemoryNoOpCommitDirectory for non-archives searchable
snapshots indices and only rely on SearchableSnapshotDirectory
that throws on write operations. Similarly, starting 9.0 searchable
snapshots shards do not write files on disk and therefore should
be able to use a Directory implementation that forbids writes.
Searchable snapshots shards for indices created before 9.0
require a mutable directory for peer-recoveries.
In this change, we only allow writes for archives indices and
searchable snapshots created before 9.0.
Relates ES-104381 parent 1378b59 commit 8502e5b
File tree
3 files changed
+50
-53
lines changed- server/src/main/java/org/elasticsearch/index/shard
- x-pack/plugin/searchable-snapshots/src
- internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots
- main/java/org/elasticsearch/xpack/searchablesnapshots/store
3 files changed
+50
-53
lines changedLines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3209 | 3209 | | |
3210 | 3210 | | |
3211 | 3211 | | |
3212 | | - | |
| 3212 | + | |
| 3213 | + | |
| 3214 | + | |
| 3215 | + | |
| 3216 | + | |
| 3217 | + | |
3213 | 3218 | | |
3214 | 3219 | | |
3215 | 3220 | | |
| |||
Lines changed: 1 addition & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
| |||
72 | 69 | | |
73 | 70 | | |
74 | 71 | | |
75 | | - | |
76 | 72 | | |
77 | 73 | | |
78 | 74 | | |
79 | | - | |
80 | 75 | | |
81 | 76 | | |
82 | | - | |
83 | 77 | | |
84 | 78 | | |
85 | 79 | | |
| |||
258 | 252 | | |
259 | 253 | | |
260 | 254 | | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | 255 | | |
| 256 | + | |
277 | 257 | | |
278 | 258 | | |
279 | 259 | | |
| |||
Lines changed: 43 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
277 | 279 | | |
278 | 280 | | |
279 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
280 | 286 | | |
281 | 287 | | |
282 | 288 | | |
| |||
288 | 294 | | |
289 | 295 | | |
290 | 296 | | |
291 | | - | |
| 297 | + | |
292 | 298 | | |
293 | 299 | | |
294 | 300 | | |
295 | | - | |
296 | | - | |
297 | | - | |
| 301 | + | |
298 | 302 | | |
299 | 303 | | |
300 | | - | |
301 | | - | |
302 | | - | |
| 304 | + | |
303 | 305 | | |
304 | 306 | | |
305 | 307 | | |
306 | | - | |
| 308 | + | |
307 | 309 | | |
308 | 310 | | |
309 | 311 | | |
310 | 312 | | |
311 | | - | |
| 313 | + | |
312 | 314 | | |
313 | 315 | | |
314 | 316 | | |
315 | 317 | | |
316 | | - | |
| 318 | + | |
317 | 319 | | |
318 | 320 | | |
319 | 321 | | |
320 | 322 | | |
321 | | - | |
| 323 | + | |
322 | 324 | | |
323 | 325 | | |
324 | | - | |
325 | | - | |
326 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
327 | 330 | | |
328 | 331 | | |
329 | 332 | | |
| |||
612 | 615 | | |
613 | 616 | | |
614 | 617 | | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
632 | 633 | | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
633 | 645 | | |
634 | 646 | | |
635 | 647 | | |
| |||
0 commit comments