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:
- start-commit for slave,
- pre-commit for slave,
- start-commit for master
- pre-commit for master,
- post-commit for master,
- post-commit for slave.
For a revision property change performed through the slave repository, hooks are executed in the following order:
- pre-revprop for slave,
- pre-revprop for master,
- post-revprop for master,
- 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):
- pre-lock for slave,
- pre-lock for master,
- post-lock for master,
- post-lock for slave.
See also
KB129: Getting started with VDFS replication in an Active Directory environment