IBM Support

Controlling deferred loading of back reference list fields for ClearQuest

Question & Answer


Question

How can I control whether or not ClearQuest will defer loading of back reference list fields?

Cause

Deferred loading of a back reference list field may cause problems for a hook or script. This may happen if the hook or script makes incorrect assumptions about the behavior and value of a back reference list field.

Answer

Loading of reference list fields can now be deferred until needed in order to improve performance.

There are two parts to this feature. One happens at the core level and is automatic for back reference fields. The other is in the Web client and is part of the List View Query feature which applies to all reference list fields and must be configured to be enabled for specific fields.

This technote is about how the feature works at the core level.

When a record is loaded from the database into the ClearQuest core, the back reference fields will not be loaded along with the other fields of a record. A back reference list field will be loaded when first accessed, either for display on a form or by a hook or script that accesses the field. Record loading performance will be improved in cases where the field value is not needed.

It is important to note that the value of a back reference list field is determined by the forward references from other records. A back reference list field cannot be modified directly, but its value can change at any time, even if the containing record is not being modified. Normally this does not cause any problems, but it could cause unexpected behavior if hook code is sensitive to the value of a back reference list field.

The problem may arise if the hook assumes something about the value of the back reference list field (without actually reading the value). That assumption may be true when the record is loaded but may not be true when the field value is accessed later because the back reference list field value can change at any time.

For example, the hook may assume a back reference list field is empty based on previous activity or state of the record. If a new reference is added before the hook reads the field value, such that the back reference list field contains one item, the hook may not be written in a way that will properly handle that item.

If this is a problem for hook code, the hook should be updated to read the back reference list field right after the record is loaded. Until the schema can be updated with that change, the deferred loading can be disabled with a master property.

The master property is LAZY_LOAD_BACK_REFERENCES. A value of "0" will disable deferred loading. A value of "1" will enable it. The setting applies to all user databases associated with a schema repository, and affects all back reference list fields on all record types of any schema used in those User Databases. There is no ability at this time to control applicability of this master property in a more granular manner.

To disable deferred loading of back reference list fields use this command:


installutil setmasterproperty <dbset_name> <cq_login> <cq_password> LAZY_LOAD_BACK_REFERENCES "0"


To enable deferred loading of back reference list fields use this command:


installutil setmasterproperty <dbset_name> <cq_login> <cq_password> LAZY_LOAD_BACK_REFERENCES "1"


Setting the value of the master property to an empty string, with "", will restore the default behavior, which is that deferred loading is enabled.

Note: The above LAZY_LOAD_BACK_REFERENCES masterproperty settings will apply in future FixPacks, in the initial 9.0.0.0 eGA this property can be set only via schema properties. Technote #1632013 has a concrete example of setting schema properties using packageutil setproperty.

[{"Product":{"code":"SSSH5A","label":"Rational ClearQuest"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"General Information","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.0.0.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
17 June 2018

UID

swg21976816