cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nvazquez <...@git.apache.org>
Subject [GitHub] cloudstack pull request #1994: CLOUDSTACK-9827: Storage tags stored in multi...
Date Tue, 14 Mar 2017 19:00:17 GMT
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<StoragePoolTagVO> searchByIds(Long... stIds) {
    +        final int detailsBatchSize = getDetailsBatchSize();
    +
    +        // query details by batches
    +        List<StoragePoolTagVO> uvList = new ArrayList<StoragePoolTagVO>();
    +        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.
---

Mime
View raw message