[es/versionCheck] explain why we need to track per-server

This commit is contained in:
spalger 2016-10-27 16:30:41 -07:00
parent cda9594859
commit 5eb9ccdc41

View file

@ -9,8 +9,14 @@ import semver from 'semver';
import isEsCompatibleWithKibana from './is_es_compatible_with_kibana';
import SetupError from './setup_error';
// tracks the node descriptions that get logged in warnings so
// that we don't spam the log with the same message over and over
/**
* tracks the node descriptions that get logged in warnings so
* that we don't spam the log with the same message over and over.
*
* There are situations, like in testing or multi-tenancy, where
* the server argument changes, so we must track the previous
* node warnings per server
*/
const lastWarnedNodesForServer = new WeakMap();
module.exports = function checkEsVersion(server, kibanaVersion) {