This is an automated email from the ASF dual-hosted git repository. bmahler pushed a commit to branch 1.6.x in repository https://gitbox.apache.org/repos/asf/mesos.git
commit 1041824d624be03154450d5ee551edeec78c7e06 Author: Andrei Sekretenko <[email protected]> AuthorDate: Fri Jun 21 14:50:32 2019 -0400 Fixed REVIVE to clear filters for only the specified roles. This is a fix for MESOS-9856 bug wich was causing all the offer filters to be cleared by reviveOffers() called for a specific subset of roles. Review: https://reviews.apache.org/r/70926/ --- src/master/allocator/mesos/hierarchical.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/master/allocator/mesos/hierarchical.cpp b/src/master/allocator/mesos/hierarchical.cpp index 302cacd..ad4326e 100644 --- a/src/master/allocator/mesos/hierarchical.cpp +++ b/src/master/allocator/mesos/hierarchical.cpp @@ -1319,7 +1319,6 @@ void HierarchicalAllocatorProcess::reviveOffers( CHECK(frameworks.contains(frameworkId)); Framework& framework = frameworks.at(frameworkId); - framework.offerFilters.clear(); framework.inverseOfferFilters.clear(); const set<string>& roles = roles_.empty() ? framework.roles : roles_; @@ -1328,9 +1327,11 @@ void HierarchicalAllocatorProcess::reviveOffers( // SUPPRESS is not parameterized. When parameterization is added, // we may need to differentiate between the cases here. foreach (const string& role, roles) { - CHECK(frameworkSorters.contains(role)); + framework.offerFilters.erase(role); + CHECK(frameworkSorters.contains(role)); frameworkSorters.at(role)->activate(frameworkId.value()); + framework.suppressedRoles.erase(role); }
