You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mz...@apache.org on 2019/05/13 14:57:29 UTC
[mesos] 03/04: Fixed a bug where random sorter fails to clear
removed clients.
This is an automated email from the ASF dual-hosted git repository.
mzhu pushed a commit to branch 1.8.x
in repository https://gitbox.apache.org/repos/asf/mesos.git
commit c557d9e0ad0581472413f7ab9b1ed850c29bfc6f
Author: Meng Zhu <mz...@mesosphere.io>
AuthorDate: Mon May 13 14:32:37 2019 +0200
Fixed a bug where random sorter fails to clear removed clients.
Review: https://reviews.apache.org/r/70630
---
src/master/allocator/sorter/random/sorter.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/master/allocator/sorter/random/sorter.cpp b/src/master/allocator/sorter/random/sorter.cpp
index 813f5b5..9899cfd 100644
--- a/src/master/allocator/sorter/random/sorter.cpp
+++ b/src/master/allocator/sorter/random/sorter.cpp
@@ -583,6 +583,9 @@ void RandomSorter::SortInfo::updateRelativeWeights()
activeInternalNodes.contains(node);
};
+ clients.clear();
+ weights.clear();
+
// Note, though we reserve here, the size of the vector will always
// grow (as we add more roles).
clients.reserve(sorter->clients.size());