Skip to content

Commit 7f60ef3

Browse files
Include index UUID in "unknown project" case
1 parent d9a9a7f commit 7f60ef3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/main/java/org/elasticsearch/indices/NodeIndicesStats.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@ private String xContentKey(Index index, ToXContent.Params outerParams) {
319319
ProjectId projectId = projectsByIndex.get(index);
320320
if (projectId == null) {
321321
// This can happen if the stats were captured after the IndexService was created but before the state was updated.
322-
// The best we can do is handle it gracefully.
323-
return "<unknown>/" + index.getName();
322+
// The best we can do is handle it gracefully. We include the UUID as well as the name to ensure it is unambiguous.
323+
return "<unknown>/" + index.getName() + "/" + index.getUUID();
324324
} else {
325325
return projectId + "/" + index.getName();
326326
}

0 commit comments

Comments
 (0)