2.3 Kinds of Derived Objects

The following sections describe the kinds of DOs and their lifecycles.

During a regular build, ClearCase build tools create shareable derived objects. During an express build, they create nonshareable derived objects. Both kinds of DOs have configuration records, but only shareable DOs can be winked in by other views.

Shareable DOs

When a ClearCase build tool creates a shareable DO, it creates a configuration record for the DO and writes information about the DO into the VOB. (At this point, the DO is shareable but unshared.) Builds in other views use this information during configuration lookup. If the build determines that it can wink in an existing DO, it contacts the view containing the DO and promotes the DO to the VOB. (The DO is now shareable and shared.)

As noted in Express Builds, you must consider whether the performance benefit of winking in DOs is worth the performance cost of making them available for winkin.

NOTE: The process of looking for a DO to wink in uses an efficient algorithm to eliminate mismatches. The build tool does not contact other views to retrieve configuration records unless the configuration lookup process determines that there is a winkin candidate.

The configuration lookup process cannot guarantee that the DO is suitable for use. The process uses details in the config record to determine whether a DO is suitable for winkin, but the config record does not record all parameters of a build. For example, a config record may list only a compiler's name and the options used. If two builds use incompatible compilers with the same name, unwanted winkins from one build to the other can occur.

NOTE: To minimize occurrences of incorrect winkin, all developers must use the same set of tools. For example, put your build tools under version control and always run them from the VOB.

Nonshareable DOs

During an express build, the ClearCase build tool creates nonshareable DOs. The build tool creates a configuration record for the DO, but does not write information about the DO into the VOB. Because scanning the information in the VOB is the only method other builds use to find DOs, other builds cannot wink in nonshareable DOs. However, a nonshareable DO can be reused by the view in which it was built.

A nonshareable DO can have shareable sub-DOs, but not shareable siblings. A nonshareable DO can be built using a winked-in shareable DO. (However, a shareable DO cannot have nonshareable sub-DOs or siblings.)

For information on enabling express builds, see Using Express Builds to Prevent Winkin to Other Views.

You can use the same commands that you use with shareable DOs on nonshareable DOs, but some commands work differently on the two kinds of DOs. The reference pages for the commands describe the differences.

Storage of Derived Objects

When a DO is created, its data container is located in the view storage area. For a shareable DO, the ClearCase build tool creates the VOB database object for the DO; it also writes to the VOB information about the DO that can be used during configuration lookup. A nonshareable DO has no VOB database object, and the build tool does not write any configuration lookup information into the VOB (Figure 5).

A DO consists of the following parts:

When a shareable DO is first created, it is unshared:

Promotion and Winkin

The first time a shareable derived object is winked in by another dynamic view, or when either kind of DO is promoted manually with a winkin or view_scrubber -p command, its status changes to shared:

When the winkin occurs during a clearmake or omake build:

When the winkin is done with the winkin or view_scrubber -p command, the data container in the view is removed after it is promoted to VOB storage. The original view and all other views to which the DO is subsequently winked in use the data container in VOB storage.

Figure 5 Storage of a Shareable Derived Object

After a derived object is winked in, it remains shared, no matter how many times it is winked in to additional dynamic views, and even if subsequent rebuilds or deletion commands cause it to appear in only one dynamic view (or zero views).

When a derived object's data container is in the VOB, any number of views can share the derived object without having to communicate with each other directly. For example, view alpha can be unaware of views beta and gamma, with which it shares a derived object. The hosts on which the view storage directories are located need not have network access to each other's disk storage.

If clearmake attempts a winkin that fails, it checks to see if any VOBs are locked. If it finds a locked VOB, it waits until the VOB is unlocked and then retries the winkin.

For more information, see the winkin and view_scrubber reference pages.

DO Versions

You can check in a derived object as a version of an element, creating a DO version. Other versions of such an element can also be, but need not be, derived objects. A DO version behaves like both a version and a derived object:

For more information on DO versions, see Working with DO Versions.