Skip to content

Commit efa09df

Browse files
authored
Assert no project global blocks in a mixed cluster (#129496)
Relates #127978
1 parent 1e135fe commit efa09df

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/src/main/java/org/elasticsearch/cluster/block/ClusterBlocks.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,8 @@ public void writeTo(StreamOutput out) throws IOException {
556556
out.writeMap(indices, (o, s) -> writeBlockSet(s, o));
557557
if (out.getTransportVersion().onOrAfter(TransportVersions.PROJECT_DELETION_GLOBAL_BLOCK)) {
558558
writeBlockSet(projectGlobal, out);
559+
} else {
560+
assert projectGlobal.isEmpty() : "Any MP-enabled cluster must be past TransportVersions.PROJECT_DELETION_GLOBAL_BLOCK";
559561
}
560562
}
561563
}

0 commit comments

Comments
 (0)