Commit 5bec522
committed
File-based with soft-deletes should send ops after checkpoint
Today a file-based recovery will replay all existing translog operations from
the primary on a replica so that that replica can have a full history in
translog as the primary. However, with soft-deletes enabled, we should not do
it because:
1. All operations before the local checkpoint of the safe commit exist in the
commit already.
2. The number of operations before the local checkpoint may be considerable and
requires a significant amount of time to replay on a replica.
Relates elastic#30522
Relates elastic#295301 parent 5b11df9 commit 5bec522
File tree
2 files changed
+12
-13
lines changed- server/src
- main/java/org/elasticsearch/indices/recovery
- test/java/org/elasticsearch/index/replication
2 files changed
+12
-13
lines changedLines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 165 | + | |
169 | 166 | | |
170 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| |||
Lines changed: 7 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
223 | | - | |
| 222 | + | |
224 | 223 | | |
225 | 224 | | |
226 | 225 | | |
| |||
232 | 231 | | |
233 | 232 | | |
234 | 233 | | |
235 | | - | |
236 | 234 | | |
237 | 235 | | |
238 | 236 | | |
| |||
280 | 278 | | |
281 | 279 | | |
282 | 280 | | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
287 | 284 | | |
288 | 285 | | |
| 286 | + | |
| 287 | + | |
289 | 288 | | |
290 | 289 | | |
291 | 290 | | |
| |||
305 | 304 | | |
306 | 305 | | |
307 | 306 | | |
308 | | - | |
309 | | - | |
| 307 | + | |
310 | 308 | | |
311 | 309 | | |
312 | 310 | | |
| |||
0 commit comments