Commit 1acba95
authored
Search Replica Allocation and Recovery (#17457)
* Restrict Search Replicas to Allocate only to Search dedicated node
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* fixed the javadoc
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* fixed tests
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* Treat Regular and Search Replicas Separately to Prevent Allocation Blocking
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* Updated tests and some refactor
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* Fixed SearchReplica recovery scenario for same node and new node
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* Updated the logic for SearchReplica recovery scenario for new node
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* Fixed nits after self review
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* Modified the search replica allocation based on node attribute
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* fixed PR comments
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* Revert "Fixed SearchReplica recovery scenario for same node and new node"
This reverts commit de1e719.
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* Separated the recovery flow method for search replica
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* Revert "fixed PR comments"
This reverts commit 8fe8dcf.
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* Added unit tests in IndexShardTests
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* updated method name and minor refactor
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* Removed search replica recovery logic from internalRecoverFromStore method
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* Added integ test to cover search node restart scenario
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* Applied search node role in tests and removed searchonly attribute
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* Fixed failing test
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* Removed unwanted comment
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
* Address PR comments
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
---------
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>1 parent 83edf75 commit 1acba95
File tree
15 files changed
+821
-239
lines changed- server/src
- internalClusterTest/java/org/opensearch
- cluster/allocation
- indices
- replication
- settings
- main/java/org/opensearch
- cluster
- routing/allocation
- allocator
- decider
- common/settings
- index/shard
- test/java/org/opensearch
- cluster/routing/allocation
- allocator
- decider
- index/shard
- test/framework/src/main/java/org/opensearch/cluster
15 files changed
+821
-239
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | | - | |
| 26 | + | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
40 | 37 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 38 | + | |
49 | 39 | | |
50 | 40 | | |
51 | 41 | | |
| |||
57 | 47 | | |
58 | 48 | | |
59 | 49 | | |
60 | | - | |
| 50 | + | |
61 | 51 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 52 | + | |
79 | 53 | | |
80 | 54 | | |
81 | 55 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 56 | + | |
| 57 | + | |
86 | 58 | | |
87 | 59 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | 60 | | |
97 | 61 | | |
98 | 62 | | |
| |||
115 | 79 | | |
116 | 80 | | |
117 | 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 | + | |
118 | 106 | | |
119 | | - | |
120 | | - | |
| 107 | + | |
121 | 108 | | |
122 | 109 | | |
123 | 110 | | |
| |||
Lines changed: 37 additions & 44 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | | - | |
43 | 41 | | |
44 | 42 | | |
45 | 43 | | |
| |||
84 | 82 | | |
85 | 83 | | |
86 | 84 | | |
87 | | - | |
| 85 | + | |
| 86 | + | |
88 | 87 | | |
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
95 | | - | |
| 94 | + | |
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
100 | | - | |
| 99 | + | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
117 | | - | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
| 146 | + | |
154 | 147 | | |
155 | 148 | | |
156 | 149 | | |
157 | | - | |
| 150 | + | |
158 | 151 | | |
159 | 152 | | |
160 | 153 | | |
161 | 154 | | |
162 | 155 | | |
163 | 156 | | |
164 | 157 | | |
165 | | - | |
| 158 | + | |
166 | 159 | | |
167 | 160 | | |
168 | 161 | | |
169 | | - | |
170 | | - | |
171 | | - | |
| 162 | + | |
172 | 163 | | |
173 | | - | |
| 164 | + | |
174 | 165 | | |
175 | | - | |
| 166 | + | |
176 | 167 | | |
177 | | - | |
178 | | - | |
179 | | - | |
| 168 | + | |
| 169 | + | |
180 | 170 | | |
181 | 171 | | |
182 | 172 | | |
183 | 173 | | |
184 | | - | |
| 174 | + | |
185 | 175 | | |
186 | 176 | | |
187 | 177 | | |
| |||
190 | 180 | | |
191 | 181 | | |
192 | 182 | | |
193 | | - | |
| 183 | + | |
| 184 | + | |
194 | 185 | | |
195 | | - | |
| 186 | + | |
196 | 187 | | |
197 | | - | |
| 188 | + | |
198 | 189 | | |
199 | | - | |
| 190 | + | |
200 | 191 | | |
201 | 192 | | |
202 | 193 | | |
| |||
212 | 203 | | |
213 | 204 | | |
214 | 205 | | |
215 | | - | |
| 206 | + | |
216 | 207 | | |
217 | | - | |
| 208 | + | |
218 | 209 | | |
219 | 210 | | |
220 | | - | |
221 | | - | |
222 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
223 | 214 | | |
224 | 215 | | |
225 | 216 | | |
| |||
257 | 248 | | |
258 | 249 | | |
259 | 250 | | |
260 | | - | |
| 251 | + | |
| 252 | + | |
261 | 253 | | |
262 | | - | |
| 254 | + | |
263 | 255 | | |
264 | 256 | | |
265 | 257 | | |
266 | 258 | | |
267 | 259 | | |
268 | 260 | | |
269 | 261 | | |
270 | | - | |
| 262 | + | |
271 | 263 | | |
272 | 264 | | |
273 | 265 | | |
274 | 266 | | |
275 | 267 | | |
276 | | - | |
| 268 | + | |
277 | 269 | | |
278 | 270 | | |
279 | 271 | | |
280 | 272 | | |
281 | 273 | | |
282 | | - | |
| 274 | + | |
283 | 275 | | |
284 | 276 | | |
285 | 277 | | |
| |||
293 | 285 | | |
294 | 286 | | |
295 | 287 | | |
296 | | - | |
| 288 | + | |
| 289 | + | |
297 | 290 | | |
298 | | - | |
| 291 | + | |
299 | 292 | | |
300 | 293 | | |
301 | 294 | | |
| |||
314 | 307 | | |
315 | 308 | | |
316 | 309 | | |
317 | | - | |
| 310 | + | |
318 | 311 | | |
319 | 312 | | |
320 | 313 | | |
321 | 314 | | |
322 | 315 | | |
323 | | - | |
| 316 | + | |
324 | 317 | | |
325 | 318 | | |
server/src/internalClusterTest/java/org/opensearch/indices/replication/SearchReplicaRestoreIT.java
Lines changed: 9 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
83 | | - | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| |||
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
101 | | - | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| |||
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
117 | | - | |
118 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
119 | 122 | | |
120 | 123 | | |
121 | 124 | | |
| |||
126 | 129 | | |
127 | 130 | | |
128 | 131 | | |
| 132 | + | |
129 | 133 | | |
130 | 134 | | |
131 | 135 | | |
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | 140 | | |
142 | 141 | | |
143 | 142 | | |
| |||
0 commit comments