Understanding hook scripts for VDFS repositories

There is a separate set of hook scripts for each VDFS repository. Hook scripts configured for a master repository are executed regardless of where the data change originates from (this particular master or a slave repository). Hooks scripts configured for a slave repository are executed only if data change is initiated in this particular slave repository.

Hooks for a master VDFS repository

Hook scripts configured for a master VDFS repository are executed regardless of where data change is initiated, in a master or in a slave repository. For example, if you have a pre-commit hook configured for a master repository, the hook will be executed for:

  • commits made directly to the master repository,
  • commits made to any of the corresponding slave repositories.

Hooks for a slave VDFS repository

Hooks scripts configured for a slave VDFS repository are executed only if data change is initiated in this particular slave repository. If there is the same hook configured for the master repository, both hooks will be executed alongside to each other.

For a commit performed through the slave repository, hooks are executed in the following order:

  1. start-commit for slave,
  2. pre-commit for slave,
  3. start-commit for master
  4. pre-commit for master,
  5. post-commit for master,
  6. post-commit for slave.

For a revision property change performed through the slave repository, hooks are executed in the following order:

  1. pre-revprop for slave,
  2. pre-revprop for master,
  3. post-revprop for master,
  4. post-revprop for slave.

For a file locking operation performed through the slave repository, hooks are executed in the following order (unlock hooks are executed in the same way):

  1. pre-lock for slave,
  2. pre-lock for master,
  3. post-lock for master,
  4. post-lock for slave.

See also

KB129: Getting started with VDFS replication in an Active Directory environment

Last Modified: