You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by la...@apache.org on 2017/04/28 23:35:50 UTC
geode git commit: GEODE-2852: Lucene waitUntilFlushed timeout
enforced across all (local) buckets
Repository: geode
Updated Branches:
refs/heads/feature/GEODE-2852 [created] f47082376
GEODE-2852: Lucene waitUntilFlushed timeout enforced across all (local) buckets
* Add check for timeout in WaitUntilParallelGatewaySenderFlushedCoordinator.waitUntilFlushed()
* return false if all Callables not invoked before timeout reached
Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/f4708237
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/f4708237
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/f4708237
Branch: refs/heads/feature/GEODE-2852
Commit: f47082376335e4f7d271d3e0159439295751d8cd
Parents: 9887cfd
Author: Lynn Hughes-Godfrey <lh...@pivotal.io>
Authored: Fri Apr 28 16:33:14 2017 -0700
Committer: Lynn Hughes-Godfrey <lh...@pivotal.io>
Committed: Fri Apr 28 16:33:14 2017 -0700
----------------------------------------------------------------------
.../WaitUntilParallelGatewaySenderFlushedCoordinator.java | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/geode/blob/f4708237/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/WaitUntilParallelGatewaySenderFlushedCoordinator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/WaitUntilParallelGatewaySenderFlushedCoordinator.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/WaitUntilParallelGatewaySenderFlushedCoordinator.java
index 1388dd0..3bb220f 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/WaitUntilParallelGatewaySenderFlushedCoordinator.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/WaitUntilParallelGatewaySenderFlushedCoordinator.java
@@ -58,7 +58,13 @@ public class WaitUntilParallelGatewaySenderFlushedCoordinator
logger.debug("WaitUntilParallelGatewaySenderFlushedCoordinator: Created and being submitted "
+ callables.size() + " callables=" + callables);
}
+ long endTime = System.nanoTime() + unit.toNanos(timeout);
for (Callable<Boolean> callable : callables) {
+ // timeout exceeded, do not submit more callables, return localResult false
+ if (System.nanoTime() >= endTime) {
+ localResult = false;
+ break;
+ }
callableFutures.add(service.submit(callable));
callableCount++;
if ((callableCount % CALLABLES_CHUNK_SIZE) == 0 || callableCount == callables.size()) {