Skip to content

Commit 6921735

Browse files
authored
Add toString for ProjectStateRegistry (#130660)
It is helpful to see the actual content as part of ClusterState#toString output. Such output is sometimes logged when test fails and useful for troubleshooting.
1 parent fda201b commit 6921735

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

server/src/main/java/org/elasticsearch/cluster/project/ProjectStateRegistry.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,18 @@ Map<ProjectId, Settings> getProjectsSettings() {
145145
return Collections.unmodifiableMap(projectsSettings);
146146
}
147147

148+
@Override
149+
public String toString() {
150+
return "ProjectStateRegistry["
151+
+ "projectsSettings="
152+
+ projectsSettings
153+
+ ", projectsMarkedForDeletion="
154+
+ projectsMarkedForDeletion
155+
+ ", projectsMarkedForDeletionGeneration="
156+
+ projectsMarkedForDeletionGeneration
157+
+ ']';
158+
}
159+
148160
@Override
149161
public boolean equals(Object o) {
150162
if (this == o) return true;

0 commit comments

Comments
 (0)