Skip to content

Commit ac2d378

Browse files
committed
TODO followup
1 parent 774690b commit ac2d378

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

server/src/main/java/org/elasticsearch/index/seqno/ReplicationTracker.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,8 @@ public synchronized void updateRetentionLeasesOnReplica(final RetentionLeases re
331331
public RetentionLeases loadRetentionLeases(final Path path) throws IOException {
332332
final RetentionLeases retentionLeases = RetentionLeases.FORMAT.loadLatestState(logger, NamedXContentRegistry.EMPTY, path);
333333
if (retentionLeases == null) {
334-
if (8 <= Version.CURRENT.major) { // TODO remove this after backporting
335-
throw new IllegalStateException("no retention leases file found");
336-
} else {
337-
// upgrading from a 6.x version in which no retention leases were persisted
338-
return RetentionLeases.EMPTY;
339-
}
334+
// TODO after backporting we expect this to never happen, so adjust this to throw an exception instead.
335+
return RetentionLeases.EMPTY;
340336
}
341337
return retentionLeases;
342338
}

0 commit comments

Comments
 (0)