Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc only: fold map and task descriptions of fn args, markdown for code examples #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nurturenature
Copy link

Hi,

I'm starting a new checker for Elle, and in using the documentation for history/fold/task found two places with inaccuracies:

  • fold map description in jepsen.history.fold
    :reducer* and :combiner* functions don't take a history as the first arg

  • jepsen.history/task macro description
    macro doesn't take the single-arity argument vector mentioned

Also added markdown for code examples so the documentation, IDE help, etc is more usable/accessible.


A few observations:

The only thing that felt uncertain was the boundary with ec/combine.
If multiple graphs want to share task dependencies, they must be in an analyzer fn that combines the graph/explainers
before use by (ec/combine my-combined-graphs process-graph).
I kept finding myself wanting to pass a dependency tree of tasks vs a function to ec/combine.

And it seems like submitting a task for each :process in a history to concurrently reduce (when you need to reduce over a :process's ops) would be appropriate:

(->> processes
       (map #(h/task history (str :ww-wfr %) [] (ww-wfr-order history % ...)))
       (map deref)
       (reduce g/named-graph-union (g/linear (g/named-graph :ww-wfr (g/digraph))))
       g/forked)

Thanks for such an ergonomic way to process histories so efficiently!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant