Class LongGCDisruption
java.lang.Object
org.elasticsearch.test.disruption.SingleNodeDisruption
org.elasticsearch.test.disruption.LongGCDisruption
- All Implemented Interfaces:
ServiceDisruptionScheme
- Direct Known Subclasses:
IntermittentLongGCDisruption
Suspends all threads on the specified node in order to simulate a long gc.
-
Field Summary
FieldsFields inherited from class org.elasticsearch.test.disruption.SingleNodeDisruption
cluster, logger, random
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.elasticsearch.core.TimeValue
protected long
protected long
protected Pattern[]
boolean
boolean
isDisruptedNodeThread(String threadName)
protected void
onBlockDetected(ThreadInfo blockedThread, ThreadInfo blockingThread)
void
removeAndEnsureHealthy(InternalTestCluster cluster)
protected void
resumeThreads(Set<Thread> threads)
boolean
Checks if during disruption we ran into a known JVM issue that makesThread.suspend()
calls block for multiple seconds was observed.void
void
protected boolean
suspendThreads(Set<Thread> nodeThreads)
resolves all threads belonging to given node and suspends them if their current stack trace is "safe".Methods inherited from class org.elasticsearch.test.disruption.SingleNodeDisruption
applyToCluster, applyToNode, ensureNodeCount, removeFromCluster, removeFromNode, testClusterClosed
-
Field Details
-
disruptedNode
-
-
Constructor Details
-
LongGCDisruption
-
-
Method Details
-
sawSlowSuspendBug
public boolean sawSlowSuspendBug()Checks if during disruption we ran into a known JVM issue that makesThread.suspend()
calls block for multiple seconds was observed.- Returns:
- true if during thread suspending a call to
Thread.suspend()
took more than 3s - See Also:
- JDK-8218446
-
startDisrupting
public void startDisrupting() -
isDisruptedNodeThread
-
stopDisrupting
public void stopDisrupting() -
removeAndEnsureHealthy
-
expectedTimeToHeal
public org.elasticsearch.core.TimeValue expectedTimeToHeal() -
suspendThreads
resolves all threads belonging to given node and suspends them if their current stack trace is "safe". Threads are added to nodeThreads if suspended. returns true if some live threads were found. The caller is expected to call this method until no more "live" are found. -
getUnsafeClasses
-
getSuspendingTimeoutInMillis
protected long getSuspendingTimeoutInMillis() -
isBlockDetectionSupported
public boolean isBlockDetectionSupported() -
getBlockDetectionIntervalInMillis
protected long getBlockDetectionIntervalInMillis() -
onBlockDetected
-
resumeThreads
-