A file handle is a number that the operating system assigns temporarily to a file when it is opened. The operating system uses the file handle internally when accessing the file. Once an application has modified and saved a file, the WAFS Agent retains the handle to the file while it is waiting to be uploaded or is in the process of uploading the file to the WAFS Vault. This prevents simultaneous modification of the file across multiple Agents.
When a user tries to open an application, save a file, or open a directory, there is usually more than one "file open" or "file close" operation performed. As a performance enhancement, when the first open occurs, the WAFS Agent tries to lock the parent directory. If the Agent obtains the lock, the Agent performs the open or close file operations locally. When these operations are performed locally, the Agent does not have to send communications messages to the Vault and thereby reduces the effect of latency on the performance of the system.
Before the Agent releases the lock, the Agent combines all open operations together within one “burst” open operation and sends it to the Vault. If the directory has already been locked by another Agent, none of the files in this directory can be opened until the locking Agent relinquishes the lock.
To ensure file coherency, WAFS must retain handles on files and the current set of directory locks when and Agent loses connection with the WAFS Vault. Open file handles and locked directories can be viewed and manually closed at the WAFS Vault via the web interface. (The handle will be closed automatically when no longer needed.) Additionally, the opened file handles and directory locks will be automatically released based on a configurable timeout value.
The behavior during a loss of communications depends on the type of disconnection, defined as follows:
When an Agent ungracefully disconnects from the WAFS Vault (e.g., the application crashes, the computer is cold booted, or a loss of network occurs), WAFS retains directory locks. These directory locks can be viewed and released at the WAFS Vault via the web interface.
For graceful disconnections (e.g., Agent replication suspended, goes into period of non-replication based on scheduled replication settings, or Agent is shut down), WAFS converts directory locks to opened file handles.
If an Agent goes offline after locking a directory, the Vault does not release the locked directory. When a directory is locked by an offline Agent, the Vault returns an error if another Agent tries to open it. When the Agent reconnects to the Vault, the Vault releases the lock on the directory.
Opened file handles and locked directories by offline Agents are automatically closed after the time specified in the Editing Job Information page.
To view opened files and directories in the Vault interface
Open the Job Administration Web Interface. The Job List appears.
Click Opened Files/Directories. The Opened File List appears.
The Opened File List displays opened file handles and locked directories.
The Since column displays the date and time the file was opened or the was directory locked.
In the By column, if a file or directory was locked by an offline Agent, the name and IP address of the Agent is shown in red.
To close the file or directory manually, click Close.
To change the amount of time to retain opened file handles for disconnected Agents, refer to Editing Job Information.