Commit 712862c
committed
Trim translog when safe commit advanced (#32967)
Since #28140 when the global checkpoint is advanced, we try to move the
safe commit forward, and clean up old index commits if possible. However,
we forget to trim unreferenced translog.
This change makes sure that we prune both old translog and index commits
when the safe commit advanced.
Relates #28140
Closes #320891 parent 630a1b8 commit 712862c
File tree
3 files changed
+12
-4
lines changed- server/src
- main/java/org/elasticsearch/index/engine
- test/java/org/elasticsearch
- index/engine
- indices/recovery
3 files changed
+12
-4
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| 494 | + | |
494 | 495 | | |
495 | 496 | | |
496 | 497 | | |
| |||
1808 | 1809 | | |
1809 | 1810 | | |
1810 | 1811 | | |
| 1812 | + | |
| 1813 | + | |
1811 | 1814 | | |
1812 | 1815 | | |
1813 | 1816 | | |
| |||
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4367 | 4367 | | |
4368 | 4368 | | |
4369 | 4369 | | |
4370 | | - | |
| 4370 | + | |
| 4371 | + | |
| 4372 | + | |
| 4373 | + | |
4371 | 4374 | | |
4372 | | - | |
| 4375 | + | |
| 4376 | + | |
| 4377 | + | |
4373 | 4378 | | |
4374 | 4379 | | |
4375 | 4380 | | |
4376 | | - | |
| 4381 | + | |
4377 | 4382 | | |
4378 | 4383 | | |
4379 | 4384 | | |
| |||
4387 | 4392 | | |
4388 | 4393 | | |
4389 | 4394 | | |
| 4395 | + | |
4390 | 4396 | | |
4391 | 4397 | | |
4392 | 4398 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
| |||
0 commit comments