Skip to content

Commit e337bf7

Browse files
committed
TODO followup
1 parent ac2d378 commit e337bf7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,10 @@ public synchronized void updateRetentionLeasesOnReplica(final RetentionLeases re
330330
*/
331331
public RetentionLeases loadRetentionLeases(final Path path) throws IOException {
332332
final RetentionLeases retentionLeases = RetentionLeases.FORMAT.loadLatestState(logger, NamedXContentRegistry.EMPTY, path);
333+
334+
// TODO after backporting we expect this never to happen in 8.x, so adjust this to throw an exception instead.
335+
assert Version.CURRENT.major <= 8 : "throw an exception instead of returning EMPTY on null";
333336
if (retentionLeases == null) {
334-
// TODO after backporting we expect this to never happen, so adjust this to throw an exception instead.
335337
return RetentionLeases.EMPTY;
336338
}
337339
return retentionLeases;

0 commit comments

Comments
 (0)