Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CF707200C60 for ; Mon, 24 Apr 2017 21:29:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CE336160BA5; Mon, 24 Apr 2017 19:29:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1EA51160B93 for ; Mon, 24 Apr 2017 21:29:07 +0200 (CEST) Received: (qmail 47637 invoked by uid 500); 24 Apr 2017 19:29:07 -0000 Mailing-List: contact issues-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list issues@ambari.apache.org Received: (qmail 47628 invoked by uid 99); 24 Apr 2017 19:29:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Apr 2017 19:29:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D9824C14F1 for ; Mon, 24 Apr 2017 19:29:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id eQysJ5Y_DOza for ; Mon, 24 Apr 2017 19:29:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id A9C7A5FCAC for ; Mon, 24 Apr 2017 19:29:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D6203E0A34 for ; Mon, 24 Apr 2017 19:29:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 366A721B54 for ; Mon, 24 Apr 2017 19:29:04 +0000 (UTC) Date: Mon, 24 Apr 2017 19:29:04 +0000 (UTC) From: "Hudson (JIRA)" To: issues@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-20833) Calculation of Effective Cluster Version During a Large Upgrade is Inefficient MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 24 Apr 2017 19:29:09 -0000 [ https://issues.apache.org/jira/browse/AMBARI-20833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15981739#comment-15981739 ] Hudson commented on AMBARI-20833: --------------------------------- SUCCESS: Integrated in Jenkins build Ambari-trunk-Commit #7346 (See [https://builds.apache.org/job/Ambari-trunk-Commit/7346/]) AMBARI-20833 - Calculation of Effective Cluster Version During a Large (jhurley: [http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=2958fbefb069be22a2e6140a102ec87e6b7e1ad5]) * (edit) ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java * (edit) ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterEffectiveVersionTest.java * (edit) ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/UpdateDesiredStackAction.java * (edit) ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java > Calculation of Effective Cluster Version During a Large Upgrade is Inefficient > ------------------------------------------------------------------------------ > > Key: AMBARI-20833 > URL: https://issues.apache.org/jira/browse/AMBARI-20833 > Project: Ambari > Issue Type: Bug > Components: ambari-server > Affects Versions: 2.4.0 > Reporter: Jonathan Hurley > Assignee: Jonathan Hurley > Priority: Critical > Fix For: 2.5.1 > > Attachments: AMBARI-20833.patch > > > On clusters which are large (1000's of hosts, 10's of 1000's of components), prior upgrades which have been finalized can cause problems when starting future upgrades: > {code} > at org.apache.ambari.server.orm.dao.HostRoleCommandDAO.findByRequestIdAndStatuses(HostRoleCommandDAO.java:321) > at org.apache.ambari.server.orm.dao.HostRoleCommandDAO$$EnhancerByGuice$$51ca179d.CGLIB$findByRequestIdAndStatuses$2() > at org.apache.ambari.server.orm.dao.HostRoleCommandDAO$$EnhancerByGuice$$51ca179d$$FastClassByGuice$$2f8d96f3.invoke() > at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) > at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) > at org.apache.ambari.server.orm.AmbariLocalSessionInterceptor.invoke(AmbariLocalSessionInterceptor.java:53) > at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) > at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52) > at org.apache.ambari.server.orm.dao.HostRoleCommandDAO$$EnhancerByGuice$$51ca179d.findByRequestIdAndStatuses() > at org.apache.ambari.server.state.cluster.ClusterImpl.getUpgradeInProgress(ClusterImpl.java:1234) > at org.apache.ambari.server.state.cluster.ClusterImpl.getEffectiveClusterVersion(ClusterImpl.java:1251) > at org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper.addCustomCommandAction(AmbariCustomCommandExecutionHelper.java:439) > at org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper.addExecutionCommandsToStage(AmbariCustomCommandExecutionHelper.java:1039) > at org.apache.ambari.server.controller.internal.UpgradeResourceProvider.makeCommandStage(UpgradeResourceProvider.java:1520) > at org.apache.ambari.server.controller.internal.UpgradeResourceProvider.createStage(UpgradeResourceProvider.java:1311) > at org.apache.ambari.server.controller.internal.UpgradeResourceProvider.createUpgrade(UpgradeResourceProvider.java:973) > {code} > AMBARI-20672 partially fixes this by keeping the {{UpgradeEntity}} association in even during suspended upgrades. Therefore, a query against {{HostRoleCommandDAO}} isn't needed anymore. However, if an upgrade is in progress, we must still walk the upgrade to determine if the {{UpdateDesiredStackAction}} has been called yet. This calculation can be cached and invalidated to prevent the need to traverse a massive upgrade hierarchy. -- This message was sent by Atlassian JIRA (v6.3.15#6346)