Commit 5c50f5f
committed
Separate acquiring safe commit and last commit (#28271)
Previously we introduced a new parameter to `acquireIndexCommit` to
allow acquire either a safe commit or a last commit. However with the
new parameters, callers can provide a nonsense combination - flush first
but acquire the safe commit. This commit separates acquireIndexCommit
method into two different methods to avoid that problem. Moreover, this
change should also improve the readability.
Relates #280381 parent f05c6be commit 5c50f5f
File tree
11 files changed
+51
-24
lines changed- server/src
- main/java/org/elasticsearch
- index
- engine
- shard
- store
- indices/recovery
- repositories
- snapshots
- test/java/org/elasticsearch
- index/engine
- indices/recovery
- test/framework/src/main/java/org/elasticsearch/index/shard
11 files changed
+51
-24
lines changedLines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
868 | 868 | | |
869 | 869 | | |
870 | 870 | | |
871 | | - | |
| 871 | + | |
872 | 872 | | |
873 | 873 | | |
874 | | - | |
875 | 874 | | |
876 | 875 | | |
877 | | - | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
878 | 882 | | |
879 | 883 | | |
880 | 884 | | |
| |||
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1776 | 1776 | | |
1777 | 1777 | | |
1778 | 1778 | | |
1779 | | - | |
| 1779 | + | |
1780 | 1780 | | |
1781 | 1781 | | |
1782 | 1782 | | |
1783 | 1783 | | |
1784 | 1784 | | |
1785 | 1785 | | |
1786 | 1786 | | |
1787 | | - | |
1788 | | - | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
1789 | 1795 | | |
1790 | 1796 | | |
1791 | 1797 | | |
| |||
Lines changed: 18 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1093 | 1093 | | |
1094 | 1094 | | |
1095 | 1095 | | |
1096 | | - | |
| 1096 | + | |
1097 | 1097 | | |
1098 | 1098 | | |
1099 | | - | |
1100 | 1099 | | |
1101 | 1100 | | |
1102 | | - | |
1103 | | - | |
| 1101 | + | |
| 1102 | + | |
1104 | 1103 | | |
1105 | 1104 | | |
1106 | | - | |
| 1105 | + | |
1107 | 1106 | | |
1108 | 1107 | | |
1109 | 1108 | | |
1110 | 1109 | | |
1111 | 1110 | | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
1112 | 1124 | | |
1113 | 1125 | | |
1114 | 1126 | | |
| |||
1137 | 1149 | | |
1138 | 1150 | | |
1139 | 1151 | | |
1140 | | - | |
| 1152 | + | |
1141 | 1153 | | |
1142 | 1154 | | |
1143 | 1155 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
| 265 | + | |
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | | - | |
| 411 | + | |
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
| |||
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2139 | 2139 | | |
2140 | 2140 | | |
2141 | 2141 | | |
2142 | | - | |
| 2142 | + | |
2143 | 2143 | | |
2144 | 2144 | | |
2145 | 2145 | | |
| |||
4373 | 4373 | | |
4374 | 4374 | | |
4375 | 4375 | | |
4376 | | - | |
| 4376 | + | |
| 4377 | + | |
| 4378 | + | |
| 4379 | + | |
| 4380 | + | |
| 4381 | + | |
4377 | 4382 | | |
4378 | 4383 | | |
4379 | 4384 | | |
4380 | 4385 | | |
4381 | 4386 | | |
4382 | 4387 | | |
4383 | 4388 | | |
4384 | | - | |
| 4389 | + | |
4385 | 4390 | | |
4386 | 4391 | | |
4387 | 4392 | | |
4388 | | - | |
| 4393 | + | |
4389 | 4394 | | |
4390 | 4395 | | |
4391 | 4396 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
400 | | - | |
| 400 | + | |
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
| |||
0 commit comments