Package org.elasticsearch.snapshots
Class SnapshotStressTestsHelper.TrackedCluster
java.lang.Object
org.elasticsearch.snapshots.SnapshotStressTestsHelper.TrackedCluster
- Enclosing class:
SnapshotStressTestsHelper
Test harness for snapshot stress tests.
The test performs random operations on the cluster, as if from an external client:
- indexing docs, deleting and re-creating the indices
- restarting nodes
- removing and adding repositories
- taking snapshots (sometimes partial), cloning them, and deleting them
It ensures that these operations should succeed via a system of shared/exclusive locks implemented via permits: acquiring a single
permit is a shared lock, whereas acquiring all the permits is an exclusive lock. So for instance taking a snapshot acquires a shared
lock on the repository (permitting other concurrent snapshots/clones/deletes) whereas deleting and recreating the repository requires
an exclusive lock (ensuring that there are no ongoing operations on the repository, and preventing any new such operations from
starting).
None of the operations block. If the necessary locks aren't all available then the operation just releases the ones it has acquired
and tries again later.
The test completes after completing a certain number of snapshots (see
completedSnapshotLatch) or after a certain time has
elapsed.-
Constructor Summary
ConstructorsConstructorDescriptionTrackedCluster(InternalTestCluster cluster, Set<String> masterNodeNames, Set<String> dataNodeNames) -
Method Summary
-
Constructor Details
-
TrackedCluster
public TrackedCluster(InternalTestCluster cluster, Set<String> masterNodeNames, Set<String> dataNodeNames)
-
-
Method Details
-
numberOfReplicasUpperBound
protected int numberOfReplicasUpperBound() -
run
- Throws:
InterruptedException
-