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 38824200C3D for ; Tue, 14 Mar 2017 20:00:20 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 37420160B7E; Tue, 14 Mar 2017 19:00:20 +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 B8B46160B63 for ; Tue, 14 Mar 2017 20:00:19 +0100 (CET) Received: (qmail 82429 invoked by uid 500); 14 Mar 2017 19:00:18 -0000 Mailing-List: contact dev-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 dev@cloudstack.apache.org Received: (qmail 82418 invoked by uid 99); 14 Mar 2017 19:00:17 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Mar 2017 19:00:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C8554DFE1E; Tue, 14 Mar 2017 19:00:17 +0000 (UTC) From: nvazquez To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request #1994: CLOUDSTACK-9827: Storage tags stored in multi... Content-Type: text/plain Message-Id: <20170314190017.C8554DFE1E@git1-us-west.apache.org> Date: Tue, 14 Mar 2017 19:00:17 +0000 (UTC) archived-at: Tue, 14 Mar 2017 19:00:20 -0000 Github user nvazquez commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1994#discussion_r105998903 --- Diff: engine/schema/src/com/cloud/storage/dao/StoragePoolTagsDaoImpl.java --- @@ -77,4 +92,71 @@ public void deleteTags(long poolId) { txn.commit(); } + @Override + public List searchByIds(Long... stIds) { + final int detailsBatchSize = getDetailsBatchSize(); + + // query details by batches + List uvList = new ArrayList(); + int curr_index = 0; + + if (stIds.length > detailsBatchSize) { --- End diff -- I think that `if` is needed to control the max query size. I agree with the example you provided, but let's say for example that lengthOfStIds is greater that batchSize. If we remove that `if`, we will load pools on lines 100-112 but with a query size greater that batchSize (defined in line 111) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---