Liking cljdoc? Tell your friends :D
Clojure only.

lite.workload.register

The :register workload: independent linearizable registers.

Generators come from jepsen.tests.linearizable-register; the verdict comes from Knossos via jepsen.checker/linearizable. Lite supplies neither -- it only wires them to the user's handler.

Handler contract

Ops arrive with :f and a :value payload for one logical register:

:read value is nil -> return the register's current value :write value is v -> set the register to v; return normally :cas value is [old new] -> if the register holds old, set it to new; otherwise call lite.client/fail!

The workload runs many independent registers so each checked history stays short (linearizability checking is NP-hard). Which register an op addresses is on the op as :key; a target that holds a single register can ignore it.

The `:register` workload: independent linearizable registers.

Generators come from `jepsen.tests.linearizable-register`; the verdict comes
from Knossos via `jepsen.checker/linearizable`. Lite supplies neither -- it
only wires them to the user's handler.

## Handler contract

Ops arrive with `:f` and a `:value` payload for one logical register:

  :read   value is nil        -> return the register's current value
  :write  value is v          -> set the register to v; return normally
  :cas    value is [old new]  -> if the register holds `old`, set it to
                                 `new`; otherwise call `lite.client/fail!`

The workload runs many independent registers so each checked history stays
short (linearizability checking is NP-hard). Which register an op addresses
is on the op as `:key`; a target that holds a single register can ignore it.
raw docstring

workloadclj

(workload {:keys [nodes per-key-limit process-limit op-limit]
           :or {per-key-limit 20 process-limit 10 op-limit 100}})

Options:

:nodes The run's nodes; only the count matters -- the workload gives each key 2 threads per node. :per-key-limit Max ops per register (default 20). Keep this small: it bounds the length of each history Knossos must check. :process-limit Max processes touching one register (default 10). :op-limit Total ops (default 100), or false for as many as the run has time for; the underlying generator walks an unbounded key sequence, so one bound or the other has to end it.

Options:

:nodes          The run's nodes; only the count matters -- the workload
                gives each key 2 threads per node.
:per-key-limit  Max ops per register (default 20). Keep this small: it
                bounds the length of each history Knossos must check.
:process-limit  Max processes touching one register (default 10).
:op-limit       Total ops (default 100), or false for as many as the run
                has time for; the underlying generator walks an unbounded
                key sequence, so one bound or the other has to end it.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close