![]()
|
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
">Safe Updating - Using Shadow RegistersHow to Use Shadow Register FilesThe first step is to allocate space on your system for the shadow files. You do this by adding a shadow entry to the zebra.cfg file. The syntax of the shadow entry is exactly the same as for the register entry (see the Section called Register Location). The location of the shadow area should be different from the location of the main register area (if you have specified one - remember that if you provide no register setting, the default register area is the working directory of the server and indexing processes). The following excerpt from a zebra.cfg file shows one example of a setup that configures both the main register location and the shadow file area. Note that two directories or partitions have been set aside for the shadow file area. You can specify any number of directories for each of the file areas, but remember that there should be no overlaps between the directories used for the main registers and the shadow files, respectively.
When shadow files are enabled, an extra command is available at the zebraidx command line. In order to make changes to the system take effect for the users, you'll have to submit a "commit" command after a (sequence of) update operation(s).
Or you can execute multiple updates before committing the changes:
If one of the update operations above had been interrupted, the commit operation on the last line would fail: zebraidx will not let you commit changes that would destroy the running register. You'll have to rerun all of the update operations since your last commit operation, before you can commit the new changes. Similarly, if the commit operation fails, zebraidx will not let you start a new update operation before you have successfully repeated the commit operation. The server processes will keep accessing the shadow files rather than the (possibly damaged) blocks of the main register files until the commit operation has successfully completed. You should be aware that update operations may take slightly longer when the shadow register system is enabled, since more file access operations are involved. Further, while the disk space required for the shadow register data is modest for a small update operation, you may prefer to disable the system if you are adding a very large number of records to an already very large database (we use the terms large and modest very loosely here, since every application will have a different perception of size). To update the system without the use of the the shadow files, simply run zebraidx with the -n option (note that you do not have to execute the commit command of zebraidx when you temporarily disable the use of the shadow registers in this fashion. Note also that, just as when the shadow registers are not enabled, server processes will be barred from accessing the main register while the update procedure takes place. |