[ https://issues.apache.org/jira/browse/GEODE-1153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15298710#comment-15298710 ]
ASF subversion and git services commented on GEODE-1153: -------------------------------------------------------- Commit 603e6f562abce89d2dd0851a38ded4eec974b418 in incubator-geode's branch refs/heads/feature/GEODE-1153 from [~sboorlagadda] [ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=603e6f5 ] Merge branch 'develop' into feature/GEODE-1153 > BucketOperatorWrapper fails to invoke completion callback. > ---------------------------------------------------------- > > Key: GEODE-1153 > URL: https://issues.apache.org/jira/browse/GEODE-1153 > Project: Geode > Issue Type: Bug > Components: regions > Reporter: Sai Boorlagadda > Assignee: Sai Boorlagadda > > BucketOperatorWrapper.createBucket should invoke completion.onSuccess or > completion.onFailure based on create bucket status. > In the below code, a completion callback is passed in as a last argument is > ignored by the code. > {code} > @Override > public void createRedundantBucket( > final InternalDistributedMember targetMember, final int i, > final Map<String, Long> colocatedRegionBytes, final Completion > completion) { > > if(stats != null) { > stats.startBucketCreate(regionCount); > } > > final long start = System.nanoTime(); > delegate.createRedundantBucket(targetMember, i, > colocatedRegionBytes, new Completion() { > @Override > public void onSuccess() { > long totalBytes = 0; > long elapsed= System.nanoTime() - start; > if(logger.isDebugEnabled()) { > logger.debug("Rebalancing {} redundant bucket {} created on {}", > leaderRegion, i, targetMember); > } > for (PartitionRebalanceDetailsImpl details : detailSet) { > String regionPath = details.getRegionPath(); > Long lrb = colocatedRegionBytes.get(regionPath); > if (lrb != null) { // region could have gone away - esp during > shutdow > long regionBytes = lrb.longValue(); > //Only add the elapsed time to the leader region. > details.incCreates(regionBytes, > details.getRegion().equals(leaderRegion) ? elapsed : 0); > totalBytes += regionBytes; > } > } > if(stats != null) { > stats.endBucketCreate(regionCount, true, totalBytes, elapsed); > } > } > @Override > public void onFailure() { > long elapsed= System.nanoTime() - start; > if (logger.isDebugEnabled()) { > logger.debug("Rebalancing {} redundant bucket {} failed creation > on {}", leaderRegion, i, targetMember); > } > if(stats != null) { > stats.endBucketCreate(regionCount, false, 0, elapsed); > } > } > }); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)