Skip to content

Commit

Permalink
[es/versionCheck] explain why we need to track per-server
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Oct 27, 2016
1 parent cda9594 commit 5eb9ccd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/core_plugins/elasticsearch/lib/check_es_version.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5eb9ccd

Please sign in to comment.