• Leigh Stoller's avatar
    Merge the two state machines (batchstate and state) into a single · 2025e0bd
    Leigh Stoller authored
    state machine (state). All of the stuff that was previously handled by
    using batchstate is now embedded into the one state machine. Of
    course, these mostly overlapped, so its not that much of a change,
    except that we also redid the machine, adding more states (for
    example, modify phases are now explicit. To get a picture of the
    actual state machine, on boss:
    
    		stategraph -o newstates EXPTSTATE
    		gv newstates.ps
    
    Things to note:
    
    * The "batchstate" slot of the experiments table is now used solely to
      provide a lock for batch daemon. A secondary change will be to
      change the slot name to something more appropriate, but it can
      happen anytime after this new stuff is installed.
    
    * I have left expt_locked for now, but another later change will be to remove
      expt_locked, and change it to active_busy or some such new state name in
      the state machine. I have removed most uses of expt_locked, except those
      that were necessary until there is a new state to replace it.
    
    * These new changes are an implementation of the new state machine,
      but I have not done anything fancy. Most of the code is the same as
      it was before.
    
    * I suspect that there are races with the batch daemon now, but they
      are going to be rare, and the end result is probably that a
      cancelation is delayed a little bit.
    2025e0bd
mkexpdir.in 3.64 KB