Skip to content

Commit ad6a048

Browse files
committed
Add assertion
1 parent f9e3f56 commit ad6a048

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

server/src/main/java/org/elasticsearch/cluster/metadata/IndexMetaData.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ private IndexMetaData(Index index, long version, long mappingVersion, long[] pri
349349

350350
this.index = index;
351351
this.version = version;
352+
assert mappingVersion >= 0 : mappingVersion;
352353
this.mappingVersion = mappingVersion;
353354
this.primaryTerms = primaryTerms;
354355
assert primaryTerms.length == numberOfShards;

0 commit comments

Comments
 (0)