КОИНС.Студия - Статьи - Модули - svn - Client states

Client states

States diagram

Client state diagram

States flags

active - a client is performing some task.

barrier - barrier synchronization. The client is waiting for all clients of a cluster to turn into this state. After that, the update process continues.

lock - the clients are locked in this state.

multi - this state is allowed in the multi update mode.

passive - a client is waiting for a request from the SVN-server.

single - this state is allowed in the single update mode.

unlock - the clients are unlocked in this state. In some cases both locked and unlocked flags are specified. This is because cliens may both be locked or unlocked in a given state.

A list of states

ready [passive,multi,single,unlock]

The update process is complete successfully, and the client is ready to get a new update.

single [active,single,lock,unlock]

The client is being updated in a single-client mode.

The client switches the lock as needed without notifying the server about its current state. Usually, the client is unlocked at the beginning and at the ending of the update, and is locked in the middle of the update process.

The next state of the client - ready.

start [passive,multi,single,lock,unlock]

The client is not being updated now, but is scheduled for update is will start to update as soon as the number of clients being updated now is reduced. This state is set before the update process actually starts.

The next state of the client - single or file-start in accordance to the state of the cluster.

In most cases clients are unlocked in this state, but if the previous update has failed while the client was locked, the current update may turn into this state leaving the client locked.

file-start [active,multi,unlock,lock]

Files are being updated now.

This is the very first step of the update process in the multi-client mode.

Only a limited number of clients is allowed to update files at any given moment of time. This is because if all the clients would connect to the SVN server simultaneously, it would cause the server to hang.

In most cases clients are unlocked in this state, but if the previous update has failed while the client was locked, the current update may turn into this state leaving the client locked.

The next state of the client - file-ready.

file-ready [passive,multi,barrier,unlock,lock]

Files have been updated successfully.

This state is set when the client reported it has completed updating files.

In most cases clients are unlocked in this state, but if the previous update has failed while the client was locked, the current update may turn into this state leaving the client locked.

The next state of the client - lock-acquire.

lock-acquire [active,multi,unlock,lock]

This client is acquired to lock (and is locking now).

The client is usually unlocked at the beginning of the state, an is locked at the ending of this state. But if the previous update has failed while the client was locked, the current update may turn into this state while the client is still locked.

The next state of the client - lock-confirm.

lock-confirm [passive,multi,barrier,lock]

The client has confirmed the lock.

The next state of the client - db-start.

db-start [active,multi,lock]

The database structure is being updated.

Also, file substitution is done at this step (before the database update). Internal structures are also updated at this step.

The next state of the client - db-ready.

db-ready [passive,multi,barrier,lock]

The database structure has updated successfully.

The next state of the client - lock-release.

lock-release [active,multi,lock,unlock]

The client is acquired to release the lock (and is releasing the lock now).

Some additional post-lock update procedures may also be performed at this step, for example clearing of cache.

The client is locked at the beginning of the state, and is unlocked at the ending of the state.

The next state of the client - lock-unlock.

lock-unlock [passive,barrier,multi,unlock]

The client has confirmed that he has released the lock.

The client is locked at the beginning of the state, and is unlocked at the ending of the state.

The next state of the client - ready.

error [passive,multi,single,lock,unlock]

This state is set when a client has reported a error.

In this case the s_info field contains a error message.

The clients might be locked or not, in dependance on the previous state.

aborting [active,multi,lock,unlock]

The system is waiting for the client to complete the task it is performing.

This state is set when at least one client of a cluster has reported an error.

At this state, any request from client will fail, and that client will turn into the aborted state.

This state is only set if a client is processing something now. If a client is waiting for a command from the server, the aborted state is set instead of aborting.

The clients might be locked or not, in dependance on the previous state.

aborted [passive,multi,barrier,lock,unlock]

An error has occured with another client of the cluster, and the update process is being aborted.

This state is set when a client has completed a task it had been performing when the `abort` state was set.

The clients might be locked or not, in dependance on the previous state.

When all clients of the cluster turned into this state, the cluster is turned into the error state.

Последняя модификация: 19.03.13 11:47