view_server
Server process that performs version selection for a view
APPLICABILITY
ClearCase (administrative command)
DESCRIPTION
A view_server is a long-lived process that manages activity in a particular ClearCase view. It interprets the rules in the view's config spec, and (for dynamic views) tracks modifications to view-private files for other ClearCase software.
Each view requires a dedicated view_server on the host where the view storage area resides. The view_server is started by its host's albd_server process when necessary. It runs with the identity of the albd_server (typically, user clearcase_albd and group clearcase.) A view_server remains active until it is terminated by an endview -server command or a system shutdown.
For a dynamic view, a view_server handles MVFS file-system requests (such as create, delete, and rename) by querying one or more VOB databases and comparing them against the view's own database. Using the view's config spec, it selects versions of file elements and directory elements to be in the view. It also handles requests from cleartool, clearmake, and clearaudit to look up VOB-database objects and/or names.
The view_server's procedure for resolving element names to versions is as follows:
- User-level software (for example, an invocation of the C compiler) references a pathname. The ClearCase MVFS, which processes all pathnames within VOBs, passes the pathname to the appropriate view_server process.
- The view_server attempts to locate a version of the element that matches the first rule in the config spec. If this fails, it proceeds to the next rule and, if necessary, to succeeding rules until it locates a matching version.
- When it finds a matching version, the view_server selects it and has the MVFS pass a handle to that version back to the user-level software.
The view_server and the MVFS use caching techniques to reduce the computational requirements of this scheme. See VIEW CACHES.
For a dynamic view, a view_server manages its view's database by tracking changes to objects in the view against the related objects in VOB databases (for example, the file in the view that corresponds to the checked-out version of a file element).
VIEW CONFIGURATION
When it begins execution, a view_server reads configuration information from the .view file in the view-storage directory. This is a text file that contains this information:
- Line 1: the location of the view storage directory, in hostname:pathname format
- Line 2: the view's UUID (unique identifier), which must not be changed
- Line 3: the hostname specified in line 1
NOTE: Lines 1 and 3 are placed in the .view file when the view is created, but the view_server ignores these lines thereafter.
The configuration file can include additional entries, each on a separate line:
- -nshareable_dos
- Specifies that builds in the view create nonshareable DOs. You can modify this property with the chview command.
- -cache size-in-bytes
- Sets the total size of the view_server caches to be size-in-bytes. The default is 500 KB for 32-bit platforms and 1 MB for 64-bit platforms. See VIEW CACHES.
- -textmode msdos or -textmode unix
- Specifies whether the view was created with MS-DOS or UNIX text mode. See the mkview reference page for more information.
- -readonly
- Applicable for dynamic views only. Prevents modification of the view's private data-storage area. A read-only view cannot be used for checkouts or for builds, because these operations create new files in view-private storage. (A checkout command will succeed in creating a checked-out version in the VOB database, but cannot create the corresponding view-private file.) You can modify this property with the chview command.
- Snapshot views do not implement the private data-storage area, so -readonly does not prevent the view from being used for checkouts.
- NOTE: -readonly does not prevent users from changing a view's config spec. Use view access permissions to implement this kind of restriction. (See the mkview reference page for details.)
- -snapshot
- Applicable to snapshot views only. Specifies that the view is a snapshot view.
- -ptime
- Applicable to snapshot views only. Specifies that time stamps on files copied into the view should show the time at which the version was created (rather than the current time).
VIEW CACHES
The view_server maintains a number of caches, consisting mostly of data retrieved from the VOB, to respond faster to RPCs from client machines. These are the view caches:
- Object cache, which facilitates retrieval of VOB and view objects (for example, versions and branches)
- Directory cache, which facilitates file system directory (readdir) access
- Stat cache, which stores file attributes
- Name cache, which stores names (of existing files and names that do not exist in a directory) and accelerates name lookups
When a view_server process is started, it chooses its cache size from the first one of these that yields a value:
- -cache directive in .view file (set with mkview -cachesize or setcache -view -cachesize)
- Contents of the file ccase-home-dir\var\config\view_cache_size (decimal number; set with setcache -view -host)
- Site-wide cache default stored in the registry (set with setcache -view -site)
- Default value: 500 KB on 32-bit platforms, 1 MB on 64-bit platforms
The cache size is allocated among the individual caches.
See the setcache reference page for information about setting the cache size for a view and for a site, and the getcache reference page for information about displaying cache information. For more information on optimizing performance, see the chapters on performance tuning in Administering ClearCase.
SEE ALSO
albd_server, endview, mkview, setcache, startview, view
Feedback on the documentation in this site? We welcome any comments!
Copyright © 1999 by Rational Software Corporation. All rights reserved.
|