removed clearLocalPrimaries
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/0c6c16f5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/0c6c16f5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/0c6c16f5 Branch: refs/heads/feature/GEODE-1464 Commit: 0c6c16f5df4bc62b63fa1722aa9cb61efea587d3 Parents: 3cbd0cc Author: Darrel Schneider <[email protected]> Authored: Thu Jun 2 10:58:11 2016 -0700 Committer: Darrel Schneider <[email protected]> Committed: Thu Jun 2 10:58:11 2016 -0700 ---------------------------------------------------------------------- .../internal/cache/PartitionedRegion.java | 68 -------------------- 1 file changed, 68 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0c6c16f5/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java index 16d5436..cbd893e 100755 --- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java @@ -10683,74 +10683,6 @@ public class PartitionedRegion extends LocalRegion implements } } - /** - * Clear local primary buckets. - * This is currently only used by gemfirexd truncate table - * to clear the partitioned region. - */ - public void clearLocalPrimaries() { - // rest of it should be done only if this is a store while RecoveryLock - // above still required even if this is an accessor - if (getLocalMaxMemory() > 0) { - // acquire the primary bucket locks - // do this in a loop to handle the corner cases where a primary - // bucket region ceases to be so when we actually take the lock - // (probably not required to do this in loop after the recovery lock) - // [sumedh] do we need both recovery lock and bucket locks? - boolean done = false; - Set<BucketRegion> lockedRegions = null; - while (!done) { - lockedRegions = getDataStore().getAllLocalPrimaryBucketRegions(); - done = true; - for (BucketRegion br : lockedRegions) { - try { - br.doLockForPrimary(false); - } catch (RegionDestroyedException rde) { - done = false; - break; - } catch (PrimaryBucketException pbe) { - done = false; - break; - } catch (Exception e) { - // ignore any other exception - logger.debug( - "GemFireContainer#clear: ignoring exception " - + "in bucket lock acquire", e); - } - } - } - - try { - // now clear the bucket regions; we go through the primary bucket - // regions so there is distribution for every bucket but that - // should be performant enough - for (BucketRegion br : lockedRegions) { - try { - br.clear(); - } catch (Exception e) { - // ignore any other exception - logger.debug( - "GemFireContainer#clear: ignoring exception " - + "in bucket clear", e); - } - } - } finally { - // release the bucket locks - for (BucketRegion br : lockedRegions) { - try { - br.doUnlockForPrimary(); - } catch (Exception e) { - // ignore all exceptions at this stage - logger.debug( - "GemFireContainer#clear: ignoring exception " - + "in bucket lock release", e); - } - } - } - } - - } - public void shadowPRWaitForBucketRecovery() { assert this.isShadowPR(); PartitionedRegion userPR = ColocationHelper.getLeaderRegion(this);
