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

Cluster states

Description of states

aborting

An error has occured, and the update process is being aborted.

This state is set when there is at least one client in state `aborting`.

No new commits allowed in this state.

commit

A new revision is being commited into SVN.

This state is set in the pre-commit hook, after the SVN server accepts your modifications to insert into SVN, but before these modification will actually be inserted.

No new commits allowed in this state.

error

An error has occured, and the abort process is complete.

New commits are allowed in this state.

multi

The bot is being updated in multi-server mode. All clients of a cluster are being updated now.

This state is set when you make a commit and there are more then one client attached to the bot affected by your commit.

No new commits allowed in this state.

ready

The update process is completed successfully.

You are welcome to make new commits.

schedule

The bot is to be scheduled for update.

This state is set in the post-commit hook after your modifications have been inserted into SVN, but before the update actually starts.

No new commits allowed in this state.

schedule-single

A single client is being scheduled for update.

This state is set when a client requests to get update in single mode.

This state is set only when a first client wants to update. All the subsequent clients will go directly into single state.

This state is used to determine the last revision number to use in the update.

If a new client wants to get update in a single mode, it will wait for the bot to switch to single state.

No new commits allowed in this state.

single

At least one client is being updated in a single-server mode.

Any number of clients may be updated in this mode concurrently, while other clients of the cluster will idle.

This mode is used in two cases: 1) there is exactly one client in a cluster, or 2) a new client is being added to the cluster and wants to get updated first.

In difference to the multi mode, barrier synchronization is not applied in the single.

No new commits allowed in this state.

Cluster state diagram

Cluster state diagram
  1. In the ready state (as well as in the error state, not shown on the picture) you are allowed to make a commit.

    If you make a commit, the system go into the commit state to prevent you from further commits before the update completes.

  2. An error may occur while processing the commit. In this case the system will go into the error state.

  3. When your updates are actually inserted into the SVN database, the system will turn into the schedule state. In this state a revision number is determined, and clients of the cluster are being scheduled for update.

  4. An error may occur while processing the commit. In this case the system will go into the error state.

  5. In case of success, the bot will turn into the multi state. This state is only used when there are more then one client in the cluster.

    The communication with clients starts in this state.

  6. If there is only one client in the cluster, the system will turn into the single mode.

    The client is notified about the update in this state.

  7. When the update is completed successfully, the system is turned into the ready state.

  8. If an error is occured in the multi state, the system is turned into the aborting. In this state no further update steps performing, and we only wait for all clients to complete their current update subtasks.

  9. When all the clients are reported about the completion, the system is turned into the error state.

  10. When a new client is being added to a cluster, it gets updated first. When that client requests for update the system turns into the schedule-single state, and a current revision number is determined.

    When a new client requests for update while the system in the single mode, it will get the update without going through the schedule-single state.

  11. If an error occurs, the system turns into the error state.

  12. When the revision number is determined, the client is notified to get updates in the single-server mode.

  13. If an error occurred, the system is turned into the error state.

  14. Or into the ready state in case of success.

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