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 DF8BF200C3D for ; Tue, 14 Mar 2017 19:35:47 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id DD83B160B91; Tue, 14 Mar 2017 18:35:47 +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 3592E160B63 for ; Tue, 14 Mar 2017 19:35:47 +0100 (CET) Received: (qmail 90837 invoked by uid 500); 14 Mar 2017 18:35:45 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 90828 invoked by uid 500); 14 Mar 2017 18:35:45 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 90825 invoked by uid 99); 14 Mar 2017 18:35:45 -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; Tue, 14 Mar 2017 18:35:45 +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 62529C7E45 for ; Tue, 14 Mar 2017 18:35:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.652 X-Spam-Level: X-Spam-Status: No, score=0.652 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id TUtltK4ekumq for ; Tue, 14 Mar 2017 18:35:44 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id D2DBE5FAD8 for ; Tue, 14 Mar 2017 18:35:43 +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 BA48BE030C for ; Tue, 14 Mar 2017 18:35:42 +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 C3925243B8 for ; Tue, 14 Mar 2017 18:35:41 +0000 (UTC) Date: Tue, 14 Mar 2017 18:35:41 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-9827) Storage tags stored in multiple places MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 14 Mar 2017 18:35:48 -0000 [ https://issues.apache.org/jira/browse/CLOUDSTACK-9827?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D15924759#comment-15924759 ]=20 ASF GitHub Bot commented on CLOUDSTACK-9827: -------------------------------------------- Github user rafaelweingartner commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1994#discussion_r105992559 =20 --- Diff: engine/schema/src/com/cloud/storage/dao/StoragePoolTagsDaoImp= l.java --- @@ -77,4 +92,71 @@ public void deleteTags(long poolId) { txn.commit(); } =20 + @Override + public List searchByIds(Long... stIds) { + final int detailsBatchSize =3D getDetailsBatchSize(); + + // query details by batches + List uvList =3D new ArrayList(); + int curr_index =3D 0; + + if (stIds.length > detailsBatchSize) { --- End diff -- =20 Correct me if I am wrong, but this `if` is not needed. Let's assume the configuration: ``` batchSize=3D2000 current_index=3D0 lengthOfStIds=3D100 ``` =20 `curr_index + detailsBatchSize =3D 0 + 2000`, which is not less than th= e size of the array `(100)`. Therefore, the while is not executed. Then, th= e pools will be loaded at lines 100-112 > Storage tags stored in multiple places > -------------------------------------- > > Key: CLOUDSTACK-9827 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-982= 7 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the defa= ult.)=20 > Components: Management Server > Affects Versions: 4.10.0.0 > Environment: N/A > Reporter: Mike Tutkowski > Assignee: Nicolas Vazquez > Priority: Blocker > Fix For: 4.10.0.0 > > > I marked this as a Blocker because it concerns me that we are not handlin= g storage tags correctly in 4.10 and, as such, VM storage might get placed = in locations that users don't want. > From e-mails I sent to dev@ (most recent to oldest): > If I add a new primary storage and give it a storage tag, the tag ends up= in storage_pool_details. > If I edit an existing storage pool=E2=80=99s storage tags, it places them= in storage_pool_tags. > ********** > I believe I have found another bug (one that we should either fix or exam= ine in detail before releasing 4.10). > It looks like we have a new table: cloud.storage_pool_tags. > The addition of this table seems to have broken the listStorageTags API c= ommand. When this command runs, it doesn=E2=80=99t pick up any storage tags= for me (and I know I have one storage tag). > This data used to be stored in the cloud.storage_pool_details table. It= =E2=80=99s good to put it in its own table, but will our upgrade process mo= ve the existing tags from storage_pool_details to storage_pool_tags? -- This message was sent by Atlassian JIRA (v6.3.15#6346)