Skip to content

Commit

Permalink
GG-21663 Change default system worker blocked timeout to 2 minutes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgovorukhin committed Aug 28, 2019
1 parent 1cbf102 commit dc13ad8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ public class IgniteConfiguration {
@SuppressWarnings("UnnecessaryBoxing")
public static final Long DFLT_FAILURE_DETECTION_TIMEOUT = new Long(10_000);

/** Default system worker blocked timeout in millis. */
public static final Long DFLT_SYS_WORKER_BLOCKED_TIMEOUT = 2 * 60 * 1000L;

/** Default failure detection timeout for client nodes in millis. */
@SuppressWarnings("UnnecessaryBoxing")
public static final Long DFLT_CLIENT_FAILURE_DETECTION_TIMEOUT = new Long(30_000);
Expand Down Expand Up @@ -452,7 +455,7 @@ public class IgniteConfiguration {
private Long failureDetectionTimeout = DFLT_FAILURE_DETECTION_TIMEOUT;

/** Timeout for blocked system workers detection. */
private Long sysWorkerBlockedTimeout;
private Long sysWorkerBlockedTimeout = DFLT_SYS_WORKER_BLOCKED_TIMEOUT;

/** Failure detection timeout for client nodes. */
private Long clientFailureDetectionTimeout = DFLT_CLIENT_FAILURE_DETECTION_TIMEOUT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
import static org.apache.ignite.IgniteSystemProperties.IGNITE_RESTART_CODE;
import static org.apache.ignite.IgniteSystemProperties.IGNITE_SUCCESS_FILE;
import static org.apache.ignite.IgniteSystemProperties.IGNITE_SYSTEM_WORKER_BLOCKED_TIMEOUT;
import static org.apache.ignite.IgniteSystemProperties.getLong;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
import static org.apache.ignite.cache.CacheMode.REPLICATED;
import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
Expand Down Expand Up @@ -1789,11 +1790,9 @@ private void start0(GridStartContext startCtx, IgniteConfiguration cfg, TimeBag
new IgniteException(S.toString(GridWorker.class, deadWorker))));
}
},
IgniteSystemProperties.getLong(IGNITE_SYSTEM_WORKER_BLOCKED_TIMEOUT,
cfg.getSystemWorkerBlockedTimeout() != null
? cfg.getSystemWorkerBlockedTimeout()
: cfg.getFailureDetectionTimeout()),
log);
getLong(IGNITE_SYSTEM_WORKER_BLOCKED_TIMEOUT, cfg.getSystemWorkerBlockedTimeout()),
log
);

stripedExecSvc = new StripedExecutor(
cfg.getStripedPoolSize(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void testBlockingWorker() throws Exception {

ignite.context().workersRegistry().register(worker);

assertTrue(hndLatch.await(ignite.configuration().getFailureDetectionTimeout() * 2, TimeUnit.MILLISECONDS));
assertTrue(hndLatch.await(ignite.configuration().getSystemWorkerBlockedTimeout() * 2, TimeUnit.MILLISECONDS));

Thread runner = worker.runner();

Expand Down

0 comments on commit dc13ad8

Please sign in to comment.