mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-15 09:25:40 +00:00
Today we construct the node environment relatively early in the node construction process, before we have even constructed the final environment, which means before the final settings are available. Rather, we should defer constructing the node environment until the final environment is available. This commit does that. This helps delay node environment construction until after the node roles are properly determined, which is important since the node environment does some checks on the basis of whether or not the node is neither a data nor a master node (such nodes should not have index metadata nor shard data on disk). Note that a consequence of this is that the initial log line that displays the node name, node ID, and cluster name does not appear until later in startup (after we have loaded plugins). This seems okay.