[ 
https://issues.apache.org/jira/browse/GEODE-1153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15235656#comment-15235656
 ] 

ASF subversion and git services commented on GEODE-1153:
--------------------------------------------------------

Commit 7c1d867d82b0dc45954f1d996b5f327a73abcf1d in incubator-geode's branch 
refs/heads/develop from [~sboorlagadda]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=7c1d867 ]

Revert "GEODE-1153: BucketOperatorWrapper fails to invoke completion callback."

 Reverting the fix for GEODE-1153 due to failures introduced
 by this fix. Rebalancing operation hangs due to a concurrent
 modification on a TreeSet which holds the bucket information
 during the rebalance operation.


> 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)

Reply via email to