From 80f893f9314139ec8cfa17700a8cc6ac2d4dcb4d Mon Sep 17 00:00:00 2001 From: Ioannis Kakavas Date: Mon, 25 Oct 2021 10:41:45 +0300 Subject: [PATCH] add javadoc --- .../src/main/java/org/elasticsearch/env/NodeMetadata.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/src/main/java/org/elasticsearch/env/NodeMetadata.java b/server/src/main/java/org/elasticsearch/env/NodeMetadata.java index c664e24cff335..d3bd5be39da03 100644 --- a/server/src/main/java/org/elasticsearch/env/NodeMetadata.java +++ b/server/src/main/java/org/elasticsearch/env/NodeMetadata.java @@ -76,6 +76,12 @@ public Version nodeVersion() { return nodeVersion; } + /** + * When a node starts we read the existing node metadata from disk (see NodeEnvironment@loadNodeMetadata), store a reference to the + * node version that we read from there in {@code previousNodeVersion} and then proceed to upgrade the version to + * the current version of the node ({@link NodeMetadata#upgradeToCurrentVersion()} before storing the node metadata again on disk. + * In doing so, {@code previousNodeVersion} refers to the previously last known version that this node was started on. + */ public Version previousNodeVersion() { return previousNodeVersion; }