(await-conn node)
(await-conn node port)
Block until we can connect to the given node and port. Returns a connection to the process.
Block until we can connect to the given node and port. Returns a connection to the process.
(await-join test conn port)
Block until all nodes in the test are known to this connection's replset status
Block until all nodes in the test are known to this connection's replset status
(await-primary conn)
Block until a primary is known to the current node.
Block until a primary is known to the current node.
(clock-skew-nem clock dt)
Skews clocks on a random subset of nodes by dt seconds.
Skews clocks on a random subset of nodes by dt seconds.
(composite-nemesis)
Combined nemesis for process kills, pauses, partitions, and clock skew.
Combined nemesis for process kills, pauses, partitions, and clock skew.
(db clock url)
MongoDB for a particular HTTP URL
MongoDB for a particular HTTP URL
(join! test node & opts)
Join nodes into a replica set. Blocks until any primary is visible to all nodes which isn't really what we want but oh well.
Join nodes into a replica set. Blocks until any primary is visible to all nodes which isn't really what we want but oh well.
(kill-nem clock)
A nemesis that kills/restarts Mongo on randomly selected nodes.
A nemesis that kills/restarts Mongo on randomly selected nodes.
(mongo! cmd)
Run a Mongo shell command. Spits back an unparsable kinda-json string, because what else would 'printjson' do?
Run a Mongo shell command. Spits back an unparsable kinda-json string, because what else would 'printjson' do?
(mongodb-test name opts)
Constructs a test with the given name prefixed by 'mongodb_', merging any given options. Special options for Mongo:
:tarball HTTP URL of a tarball to install :time-limit How long do we run the test for? :storage-engine Storage engine to use :protocol-version Replication protocol version
At the end of every test, we use the 'dbHash' command to verify data
consistency across each member of the replica set. We extend the nemesis to
handle the :compare-dbhashes operations because it is a client that is
straightforward to compose via the jepsen.nemesis/compose
function. We also
extend the generator and checker accordingly.
Constructs a test with the given name prefixed by 'mongodb_', merging any given options. Special options for Mongo: :tarball HTTP URL of a tarball to install :time-limit How long do we run the test for? :storage-engine Storage engine to use :protocol-version Replication protocol version At the end of every test, we use the 'dbHash' command to verify data consistency across each member of the replica set. We extend the nemesis to handle the :compare-dbhashes operations because it is a client that is straightforward to compose via the `jepsen.nemesis/compose` function. We also extend the generator and checker accordingly.
(nemesis-gen nem)
Given a nemesis name, builds a generator that emits [:name-start, :name-stop] cycles.
Given a nemesis name, builds a generator that emits [:name-start, :name-stop] cycles.
(pause-nem)
A nemesis that pauses Mongo on randomly selected nodes.
A nemesis that pauses Mongo on randomly selected nodes.
(primaries conn)
What nodes does this conn think are primaries?
What nodes does this conn think are primaries?
(primary conn)
Which single node does this conn think the primary is? Throws for multiple primaries, cuz that sounds like a fun and interesting bug, haha.
Which single node does this conn think the primary is? Throws for multiple primaries, cuz that sounds like a fun and interesting bug, haha.
(primary-divergence-nemesis clock)
(primary-divergence-nemesis clock conns)
A nemesis specifically designed to break Mongo's v0 replication protocol. There are three phases:
Isolate a primary p1 and advance its clock. Writes to this primary will not be successfully replicated, but will advance its oplog.
Allow a new primary p2 to become elected. Let it do some work, then kill it.
Heal the network and restart all nodes. p2 may have committed writes, but p1's higher optime will allow it to win the election.
A nemesis specifically designed to break Mongo's v0 replication protocol. There are three phases: 1. Isolate a primary p1 and advance its clock. Writes to this primary will not be successfully replicated, but will advance its oplog. 2. Allow a new primary p2 to become elected. Let it do some work, then kill it. 3. Heal the network and restart all nodes. p2 may have committed writes, but p1's higher optime will allow it to win the election.
(replica-set-config conn)
Returns the current replset config.
Returns the current replset config.
(replica-set-initiate! conn config)
Initialize a replica set on a node.
Initialize a replica set on a node.
(replica-set-master? conn)
What's this node's replset role?
What's this node's replset role?
(replica-set-reconfigure! conn conf)
Apply new configuration for a replica set.
Apply new configuration for a replica set.
(replica-set-status conn)
Returns the current replica set status.
Returns the current replica set status.
(std-gen)
A composite failure schedule, emitting partitions and clock skew ops.
A composite failure schedule, emitting partitions and clock skew ops.
(target-replica-set-config test port repl-set-name)
Generates the config for a replset in a given test.
Generates the config for a replset in a given test.
(with-errors op idempotent-ops & body)
Takes an invocation operation, a set of idempotent operation functions which can be safely assumed to fail without altering the model state, and a body to evaluate. Catches MongoDB errors and maps them to failure ops matching the invocation.
Takes an invocation operation, a set of idempotent operation functions which can be safely assumed to fail without altering the model state, and a body to evaluate. Catches MongoDB errors and maps them to failure ops matching the invocation.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close