Hi Rui,

In many applications, it is impossible to transit immediately from running
to paused since it takes time to "pause".  For example, a file is being
written, it takes time to flush the buffer (or even close the file) so that
the server is in a consistent state.  Therefore, we need the pausing
state.  In the pausing state, the server probably would finish the current
operations but won't start new operations.

Hope it helps.
Tsz-Wo

On Wed, Aug 19, 2020 at 9:38 PM Rui Wang <[email protected]> wrote:

> Friendly ping to raise attention: is there anyone how know the context
> about PAUSING and PAUSED states?
>
>
> -Rui
>
> On Fri, Aug 14, 2020 at 10:47 PM Rui Wang <[email protected]> wrote:
>
> > Hi community,
> >
> > I am working on RATIS-624 and my thought was:
> >
> > for pause request, transit state from RUNNING to PAUSED
> > for unpause request, transit state from PAUSED to RUNNING.
> >
> > However, I found in Ratis LifeCyle, there are both PAUSING and PAUSED
> > states existing. My question is, is there any documentation on what
> should
> > happen between RUNNING and PAUSING, PAUSING and PAUSED? (is this in the
> > raft paper some where?) What was the design intention to introduce a
> > PAUSING state?
> >
> >
> > After some thinking, I am guessing PAUSING is useful for async calls.
> E.g.
> > client send a pause request, state transits to PAUSING and return
> > immediately. The client will keep checking until the server becomes
> PAUSED
> > to do next steps. Is this correct?
> >
> > -Rui
> >
>

Reply via email to