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

Process already running and :info messages. #31

Closed
insumity opened this issue Aug 5, 2019 · 1 comment
Closed

Process already running and :info messages. #31

insumity opened this issue Aug 5, 2019 · 1 comment

Comments

@insumity
Copy link

insumity commented Aug 5, 2019

Assume you have this history.edn file:

[ {:process 1, :type :invoke, :f :cas, :value [2 0]}
  {:process 1, :type :info, :f :cas, :value [2 0]}
  {:process 1, :type :invoke, :f :read, :value nil}]

Running the above history against Knossos gives me the following result:

java.lang.RuntimeException: Process 1 already running #knossos.op.Op{:process 1, :type :invoke, :f :cas, :value [2 0], :index 0}, yet attempted to invoke #knossos.op.Op{:process 1, :type :invoke, :f :read, :value nil, :index 2} concurrently

It seems to me that after an info response, a process cannot do anything else. Looking at other histories in the knossos repository, it seems indeed the case that if a process gets an info message, it will never invoke any other operation after it.
Is this indeed the case? Maybe, the creator of issue had a similar problem.

Reading Knossos concepts here:

Every logical transition in Knossos is represented by a pair of operations: an invoke, when the op begins, and a completion: either ok if the operation took place, fail if the operation did not take place, or info if you're not sure what happened, e.g. the operation timed out.
an info response, seems like what is adequate here. We do not know whether the cas succeeded or not.

it seems to me, this does not have to be the case. For example, I could think of a client c getting an operation timed-out and hence logging an info message, however c might still want to invoke operations later on in an execution. The easy fix would be, that after every timed-out operation, client c starts logging operations (i.e., invocations and responses) with a different client identifier c'. Is there a better way to solve this issue in Knossos?

@insumity insumity changed the title Process already running? Process already running and info messages. Aug 5, 2019
@insumity insumity changed the title Process already running and info messages. Process already running and :info messages. Aug 5, 2019
@aphyr
Copy link
Collaborator

aphyr commented Aug 5, 2019

however c might still want to invoke operations later on in an execution.

This would violate the assumption that processes are single-threaded; once a process has crashed, it can't do anything else, because that might mean the process does two things at once. You are, of course, free to spin up additional processes to take the place of crashed ones, as you suggest. That's exactly what Jepsen does. :)

@insumity insumity closed this as completed Aug 6, 2019
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

No branches or pull requests

2 participants