You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by hi...@apache.org on 2017/06/27 19:55:23 UTC
[18/50] [abbrv] geode git commit: GEODE-2861: Remove dead code
GEODE-2861: Remove dead code
* code removed related to shutting down DiskStoreTaskPool
* this closes #594
Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/5039e62a
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/5039e62a
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/5039e62a
Branch: refs/heads/feature/GEODE-2804v3
Commit: 5039e62af85795e5448fa746969d001782922cc9
Parents: b517ef8
Author: Nick Reich <nr...@pivotal.io>
Authored: Fri Jun 16 15:52:00 2017 -0700
Committer: Jinmei Liao <ji...@pivotal.io>
Committed: Wed Jun 21 08:28:06 2017 -0700
----------------------------------------------------------------------
.../geode/internal/cache/DiskStoreImpl.java | 26 ------------------
.../geode/internal/cache/GemFireCacheImpl.java | 28 --------------------
2 files changed, 54 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/geode/blob/5039e62a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java
index 5a121a8..3e97d0e 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java
@@ -4615,32 +4615,6 @@ public class DiskStoreImpl implements DiskStore {
return false;
}
- private void stopDiskStoreTaskPool() {
- if (logger.isDebugEnabled()) {
- logger.debug("Stopping DiskStoreTaskPool");
- }
- shutdownPool(diskStoreTaskPool);
-
- // Allow the delayed writes to complete
- delayedWritePool.shutdown();
- try {
- delayedWritePool.awaitTermination(1, TimeUnit.SECONDS);
- } catch (InterruptedException ignore) {
- Thread.currentThread().interrupt();
- }
- }
-
- private void shutdownPool(ThreadPoolExecutor pool) {
- // All the regions have already been closed
- // so this pool shouldn't be doing anything.
- List<Runnable> l = pool.shutdownNow();
- for (Runnable runnable : l) {
- if (l instanceof DiskStoreTask) {
- ((DiskStoreTask) l).taskCancelled();
- }
- }
- }
-
public void writeRVVGC(DiskRegion dr, LocalRegion region) {
acquireReadLock(dr);
try {
http://git-wip-us.apache.org/repos/asf/geode/blob/5039e62a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
index 5eaa5a4..fe97685 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
@@ -2357,7 +2357,6 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
if (this.queryMonitor != null) {
this.queryMonitor.stopMonitoring();
}
- stopDiskStoreTaskPool();
} finally {
// NO DISTRIBUTED MESSAGING CAN BE DONE HERE!
@@ -2475,16 +2474,6 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
}
}
- /**
- * Used to guard access to compactorPool and set to true when cache is shutdown.
- */
- private final AtomicBoolean diskStoreTaskSync = new AtomicBoolean(false);
-
- /**
- * Lazily initialized. TODO: this is always null
- */
- private ThreadPoolExecutor diskStoreTaskPool = null;
-
private final ConcurrentMap<String, DiskStoreImpl> diskStores = new ConcurrentHashMap<>();
private final ConcurrentMap<String, DiskStoreImpl> regionOwnedDiskStores =
@@ -2593,23 +2582,6 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has
return allDiskStores;
}
- private void stopDiskStoreTaskPool() {
- synchronized (this.diskStoreTaskSync) {
- this.diskStoreTaskSync.set(true);
- // All the regions have already been closed
- // so this pool shouldn't be doing anything.
- if (this.diskStoreTaskPool != null) {
- List<Runnable> listOfRunnables = this.diskStoreTaskPool.shutdownNow();
- for (Runnable runnable : listOfRunnables) {
- // TODO: fix this for-loop and the one in DiskStoreImpl
- if (listOfRunnables instanceof DiskStoreTask) {
- ((DiskStoreTask) listOfRunnables).taskCancelled();
- }
- }
- }
- }
- }
-
private void stopServers() {
final boolean isDebugEnabled = logger.isDebugEnabled();
if (isDebugEnabled) {