Closed yito88 closed 3 years ago
I thiiiink what's happening here is that ConcurrentGenerator's update
calls jepsen.generator/thread->group
based on the generated event, but it's being given the new context resulting from process 1's crash. If you take a look at
There's where we perform the generator update--and we use the new context, rather than the same context that produced the operation. This is... a little tricky, but I think the right call here is to use some, but not all, of the context changes: specifically, we want to preserve the new timestamp and thread availability, but leave the thread->process mapping in place for the update, and only after update cycle to a new thread.
I'm busy with a client right now so I don't have time to write a full test case, but I put together a small patch which doesn't break any of the existing tests. Want to try out 8b9f04cc and let me know if that helps?
Just wanted to let you know--I've had a chance to test this properly, and I've released it under 0.2.1-SNAPSHOT--you should be able to bump your Jepsen dependency and have it work. :)
@aphyr Thank you so much! Our test worked well with https://github.com/jepsen-io/jepsen/commit/8b9f04cc46426b5c6a3c556777ec69c883c5b013 without the error 👍
I got an error from
independent
concurrent-generator
when I'm migrating my tests from Jepsen 0.1.18 to 0.2.0.The error always happens when an operation fails and returns op with
{:type :info}
. I think:info
is required when a test is not sure whether a write has succeeded or not.In my investigation, each thread-process pair of
ctx
's worker is basically a pair of a number like {0 0, 1 1, 2 2} when concurrency 3. But, when{:type :info}
, the pair has different number like {0 0, 1 4, 2 2}. I found thectx
's worker is updated when {:type :info} as below.I guess
{:type :info}
can be used with 0.2.0 because it is used in other tests like scylla or stolen tests. How should I use{:type :info}
for unknown writes?https://github.com/jepsen-io/jepsen/blame/master/jepsen/src/jepsen/generator/interpreter.clj#L225-L230