Return-Path: X-Original-To: apmail-cloudstack-issues-archive@www.apache.org Delivered-To: apmail-cloudstack-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DF9A810305 for ; Tue, 24 Dec 2013 01:07:50 +0000 (UTC) Received: (qmail 25848 invoked by uid 500); 24 Dec 2013 01:07:50 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 25808 invoked by uid 500); 24 Dec 2013 01:07:50 -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 25801 invoked by uid 500); 24 Dec 2013 01:07:50 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 25700 invoked by uid 99); 24 Dec 2013 01:07:50 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Dec 2013 01:07:50 +0000 Date: Tue, 24 Dec 2013 01:07:50 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-5390) listNetworks: pageSize and page parameters are not applied properly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-5390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13856067#comment-13856067 ] ASF subversion and git services commented on CLOUDSTACK-5390: ------------------------------------------------------------- Commit 914bc464845347767360040f1a47151b14480260 in branch refs/heads/master from [~alena1108] [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=914bc46 ] CLOUDSTACK-5390: when calculate index (page #) in NetworkManager, rely on fact that getStartIndex() returned by API, returns pageSize*(page-1). So to get index(page), you need to do the reverse calculation > listNetworks: pageSize and page parameters are not applied properly > ------------------------------------------------------------------- > > Key: CLOUDSTACK-5390 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5390 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Affects Versions: 4.3.0 > Reporter: Alena Prokharchyk > Assignee: Alena Prokharchyk > Priority: Critical > Fix For: 4.3.0 > > > ListNetworks call does numerous calls to the DB to get diff kinds of networks based on search criteria (Isolated and Shared). The result sets are combined and returned to the API. As page/pageSize parameters are passed only to the DB call, they are not respected while generating the final set. > There can be 2 ways to fix the problem: > 1) generate only one call to the DB > or > 2) After the result set is finalized, apply the pagination to it. > I would go with #2 as changing the db call can introduce regressions plus its very hard to achieve given the number of joins happening based on the search criteria. -- This message was sent by Atlassian JIRA (v6.1.5#6160)