You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "dengziming (Jira)" <ji...@apache.org> on 2019/12/06 07:39:00 UTC

[jira] [Created] (KAFKA-9277) move all group state transition rules into their states

dengziming created KAFKA-9277:
---------------------------------

             Summary: move all group state transition rules into their states
                 Key: KAFKA-9277
                 URL: https://issues.apache.org/jira/browse/KAFKA-9277
             Project: Kafka
          Issue Type: Improvement
            Reporter: dengziming
            Assignee: dengziming


Today the `GroupMetadata` maintain a validPreviousStates map of all GroupState:

```

private val validPreviousStates: Map[GroupState, Set[GroupState]] =
 Map(Dead -> Set(Stable, PreparingRebalance, CompletingRebalance, Empty, Dead),
 CompletingRebalance -> Set(PreparingRebalance),
 Stable -> Set(CompletingRebalance),
 PreparingRebalance -> Set(Stable, CompletingRebalance, Empty),
 Empty -> Set(PreparingRebalance))

```

It would be cleaner to move all state transition rules into their states :

```

private[group] sealed trait GroupState {
 val validPreviousStates: Set[GroupState]
}

```



--
This message was sent by Atlassian Jira
(v8.3.4#803005)