public abstract class AbstractStressTestNonBlockingLockManager
extends junit.framework.TestCase
NonBlockingLockManager
.
Goals:
1. higher concurrency of unisolated operations on the ds/journal with group commit. this only requires a "lock" per writable named index, e.g., an operation will lock exactly one resource. show consistency of the data in a suite of stress tests with varying #s of threads, tasks, and resources. Each task will lock exactly one resource - the unisolated named index on which it would write. DO THIS W/O the TxDAG first and get group commit debugged before trying to work through the tx commit stuff, which requires the WAITS_FOR graph support.
2. transaction processing integrated with unisolated operations. since a transaction MAY write on more than one index this requires a TxDAG and a queue of resources waiting to get into the granted group (which will always be a singleton since writes on unisolated named indices require exclusive locks). show that concurrency control never deadlocks in a suite of stress tests with varying #s of threads, tasks, resources, and resource locked per task. Again, a resource is a unisolated named index.
Modifier and Type | Class and Description |
---|---|
static class |
AbstractStressTestNonBlockingLockManager.Generate
Generates an XML file that can be used to (re-)run the concurrency
control tests.
|
static class |
AbstractStressTestNonBlockingLockManager.TestOptions
Options for
doComparisonTest(Properties) . |
static class |
AbstractStressTestNonBlockingLockManager.Wait10ResourceTask<T>
Waits 10ms once it acquires its locks.
|
Modifier and Type | Field and Description |
---|---|
protected static boolean |
DEBUG |
protected static boolean |
INFO |
protected static org.apache.log4j.Logger |
log |
Constructor and Description |
---|
AbstractStressTestNonBlockingLockManager() |
AbstractStressTestNonBlockingLockManager(String arg0) |
Modifier and Type | Method and Description |
---|---|
com.bigdata.testutil.ExperimentDriver.Result |
doComparisonTest(Properties properties)
Test driver.
|
void |
setUpComparisonTest(Properties properties) |
void |
tearDownComparisonTest() |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
protected static final org.apache.log4j.Logger log
protected static final boolean INFO
protected static final boolean DEBUG
public AbstractStressTestNonBlockingLockManager()
public AbstractStressTestNonBlockingLockManager(String arg0)
arg0
- public com.bigdata.testutil.ExperimentDriver.Result doComparisonTest(Properties properties) throws Exception
Note: A "resource" is a named index (partition), so set nresources based on your expectations for the #of index partitions on a journal or federation.
Note: The likelyhood of deadlock increases as (a) more locks are requested per task; and (b) fewer resources are available to be locked. When minLocks==maxLocks==nresources then tasks will be serialized since each task requires all resources in order to proceed.
Note: At minLocks==maxLocks==1 this test can be used to explore the
behavior of tasks that lock only a single resource, eg., unisolated
operations on the DataService
.
Exception
public void setUpComparisonTest(Properties properties) throws Exception
Exception
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.