Sibling of enforce access to translog via engine
Since elastic/elasticsearch#29542, we no longer expose translog instance but only provide creating translog snapshot method. This commit adapts that change in CCR branch. Relates elastic/elasticsearch#29542
This commit is contained in:
parent
56ca59a513
commit
f97aec7b8b
|
@ -262,7 +262,7 @@ public class ShardChangesAction extends Action<ShardChangesAction.Request, Shard
|
|||
final Queue<Translog.Operation> orderedOps = new PriorityQueue<>(Comparator.comparingLong(Translog.Operation::seqNo));
|
||||
|
||||
final List<Translog.Operation> operations = new ArrayList<>();
|
||||
try (Translog.Snapshot snapshot = indexShard.getTranslog().getSnapshotBetween(minSeqNo, maxSeqNo)) {
|
||||
try (Translog.Snapshot snapshot = indexShard.newTranslogSnapshotBetween(minSeqNo, maxSeqNo)) {
|
||||
for (Translog.Operation unorderedOp = snapshot.next(); unorderedOp != null; unorderedOp = snapshot.next()) {
|
||||
if (unorderedOp.seqNo() < minSeqNo || unorderedOp.seqNo() > maxSeqNo) {
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue