Hi, I am going to add the support of error->drop transition in Helix. The basic idea is to remove DROPPED state from state model; instead we add a drop() (or cleanup()) abstract method in StateModel. Applications need to implement this abstract method to take care of the drop logic. This requires no change on the controller side. On the participant side, when the participant receives a state-transition message with ToState=DROPPED, it will invoke the drop() method in the state model. When the drop() gets executed, the partition will be removed from the current state regardless of any errors/exceptions during the execution of drop(). This will prevent the infinite loop of calling drop() in case of error/exception in the execution of drop(). The advantage of this design is that we can remove DROPPED state totally from all state model definitions, which keeps the state model simple. The disadvantage is, in drop() the application need to take different drop logics based on the current state (e.g. MASTER, SLAVE, or ERROR, which will be the FromState in the message). Any suggestions?
Thanks, Jason
