Liking cljdoc? Tell your friends :D

jepsen.mongodb.core


await-connclj

(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.
sourceraw docstring

await-joinclj

(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
sourceraw docstring

await-primaryclj

(await-primary conn)

Block until a primary is known to the current node.

Block until a primary is known to the current node.
sourceraw docstring

clock-skew-nemclj

(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.
sourceraw docstring

composite-nemesisclj

(composite-nemesis)

Combined nemesis for process kills, pauses, partitions, and clock skew.

Combined nemesis for process kills, pauses, partitions, and clock skew.
sourceraw docstring

dbclj

(db clock url)

MongoDB for a particular HTTP URL

MongoDB for a particular HTTP URL
sourceraw docstring

join!clj

(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.
sourceraw docstring

kill-nemclj

(kill-nem clock)

A nemesis that kills/restarts Mongo on randomly selected nodes.

A nemesis that kills/restarts Mongo on randomly selected nodes.
sourceraw docstring

mongo!clj

(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?
sourceraw docstring

mongodb-testclj

(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.
sourceraw docstring

nemesis-genclj

(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.
sourceraw docstring

pause-nemclj

(pause-nem)

A nemesis that pauses Mongo on randomly selected nodes.

A nemesis that pauses Mongo on randomly selected nodes.
sourceraw docstring

primariesclj

(primaries conn)

What nodes does this conn think are primaries?

What nodes does this conn think are primaries?
sourceraw docstring

primaryclj

(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.
sourceraw docstring

primary-divergence-genclj

(primary-divergence-gen)
source

primary-divergence-nemesisclj

(primary-divergence-nemesis clock)
(primary-divergence-nemesis clock conns)

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.

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.
sourceraw docstring

replica-set-configclj

(replica-set-config conn)

Returns the current replset config.

Returns the current replset config.
sourceraw docstring

replica-set-initiate!clj

(replica-set-initiate! conn config)

Initialize a replica set on a node.

Initialize a replica set on a node.
sourceraw docstring

replica-set-master?clj

(replica-set-master? conn)

What's this node's replset role?

What's this node's replset role?
sourceraw docstring

replica-set-reconfigure!clj

(replica-set-reconfigure! conn conf)

Apply new configuration for a replica set.

Apply new configuration for a replica set.
sourceraw docstring

replica-set-statusclj

(replica-set-status conn)

Returns the current replica set status.

Returns the current replica set status.
sourceraw docstring

sharded-test?clj

(sharded-test? name)
source

std-genclj

(std-gen)

A composite failure schedule, emitting partitions and clock skew ops.

A composite failure schedule, emitting partitions and clock skew ops.
sourceraw docstring

target-replica-set-configclj

(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.
sourceraw docstring

with-errorsclj/smacro

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close