From dev-return-60875-archive-asf-public=cust-asf.ponee.io@storm.apache.org Sun Oct 13 21:03:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id F2F9F18065D for ; Sun, 13 Oct 2019 23:03:01 +0200 (CEST) Received: (qmail 70503 invoked by uid 500); 13 Oct 2019 21:02:57 -0000 Mailing-List: contact dev-help@storm.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@storm.apache.org Delivered-To: mailing list dev@storm.apache.org Received: (qmail 70363 invoked by uid 99); 13 Oct 2019 21:02:57 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Oct 2019 21:02:57 +0000 From: GitBox To: dev@storm.apache.org Subject: [GitHub] [storm] Ethanlm commented on a change in pull request #3136: [STORM-3519] Change ConstraintSolverStrategy::backtrackSearch to iteration Message-ID: <157100057698.4300.10335431946966023522.gitbox@gitbox.apache.org> Date: Sun, 13 Oct 2019 21:02:56 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Ethanlm commented on a change in pull request #3136: [STORM-3519] Change ConstraintSolverStrategy::backtrackSearch to iteration URL: https://github.com/apache/storm/pull/3136#discussion_r334296660 ########## File path: storm-server/src/main/java/org/apache/storm/scheduler/resource/strategies/scheduling/ConstraintSolverStrategy.java ########## @@ -320,51 +320,101 @@ private boolean checkSchedulingFeasibility(int maxStateSearch) { return GenericResourceAwareStrategy.sortObjectResourcesImpl(allResources, exec, topologyDetails, existingScheduleFunc); } - // Backtracking algorithm does not take into account the ordering of executors in worker to reduce traversal space + /** + * Try to schedule till successful or till limits (backtrack count or time) have been exceeded. + * + * @param state terminal state of the executor assignment. + * @return SolverResult with success attribute set to true or false indicting whether ALL executors were assigned. + */ @VisibleForTesting protected SolverResult backtrackSearch(SearcherState state) { - state.incStatesSearched(); - if (state.areSearchLimitsExceeded()) { - LOG.warn("Limits Exceeded"); - return new SolverResult(state, false); - } + long startTimeMilli = System.currentTimeMillis(); Review comment: Do we want to use `Time.currentTimeMillis()` since we are using it in places like this https://github.com/apache/storm/blob/master/storm-server/src/main/java/org/apache/storm/scheduler/resource/strategies/scheduling/ConstraintSolverStrategy.java#L514 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services