Handle the case when realtime segments are in OFFLINE state because there're some problem with realtime segment consumption, and realtime segment will mark itself as OFFLINE in ideal state.
The current API of toggling instance state just checks whether the current state is the same as OFFLINE state, while there's one exception that realtime segment will intentionally mark itself as OFFLINE in ideal state when there's some problem during the consumption.
Handle the case when realtime segments are in OFFLINE state because there're some problem with realtime segment consumption, and realtime segment will mark itself as OFFLINE in ideal state.
The current API of toggling instance state just checks whether the current state is the same as
OFFLINEstate, while there's one exception that realtime segment will intentionally mark itself asOFFLINEin ideal state when there's some problem during the consumption.