IBM Support

Use of UTF type managers can cause loss of data

Troubleshooting


Problem

This technote provides information about a defect in IBM Rational ClearCase which may result in the loss of data when using the UTF type managers.

Symptom


In ClearCase version 7.1 new UTF type managers were introduced:

utf8_file_delta

utf16le_file_delta

utf16be_file_delta

utf32le_file_delta

utf32be_file_delta

A serious defect was identified with these type managers which can result in the loss of data.




The symptom of the problem is that cleartext for a file version gets generated incorrectly. It will have the incorrect size; in many cases it will have size zero (an empty file).



The problem occurs when the file element is being developed on multiple branches. The worst-case scenario is that a merge to a new branch stemming from /main/0 will result in loss of data for all previously existing versions. An example of this would be a UCM interproject delivery to a project which previously did not see the file.

Note that IBM Rational ClearCase does not provide built-in element types which utilize these type managers.

This will only affect clients which have created a custom element types (eltype).

The defect affects the management of the source containers, not the diff/merge tools.

Cause



This issue has been identified as a product defect under APAR PM03366.

Resolving The Problem


Defect APAR PM03366 has been resolved in ClearCase 7.1.1.1.

If you suspect you have encountered this issue, contact IBM Rational Client Support, and be prepared with access to backup data of the affected VOB.

Note: Ensure that you stop the overwrite or removal of old backups (refer to the Recovery of lost data section below).



Recommendation

Avoid using the UTF type managers until the fix can be applied. Existing file elements should be converted to a different element type with the cleartool chtype command (refer to the Avoiding the problem section below for further details).

Important Note: Ensure that you stop the overwrite or removal of old backups in the event they are needed for data recovery.


Avoiding the problem

To remove the danger quickly you should chtype to "binary_delta_file". It is possible to build a type manager that is based on "binary_delta_file" but uses the UTF diff/merge tools.

Note: You may decide to run the detection steps below before running the following chtype.



The following commands, in a dynamic view, will change elements in all mounted VOBs.

On Windows:
echo cleartool chtype -force -c "Ref IBM APAR PM03366" "binary_delta_file" "%CLEARCASE_PN%" > %TEMP%\chtype_bdf.bat

cleartool find -avobs -type file -element "eltype(type-name)" -exec "%TEMP%\chtype_bdf.bat"

On UNIX or Linux:


echo cleartool chtype -force -c \"Ref IBM APAR PM03366\" "binary_delta_file" \"\$CLEARCASE_PN\" > /tmp/chtype_bdf.sh

cleartool find -avobs -type file -element 'eltype(type-name)' -exec '/bin/sh /tmp/chtype_bdf.sh'




Detecting damage

Note: You may decide to run this detection before running the chtype above.

The attached script 'ck_ver_cltxt_len.pl' can be used to detect versions where the cleartext constructs to a size that is different than ClearCase recorded at version checkin. It can be used to check for all versions in a VOB, or for all versions of a specific element. Below we assume you have saved the script to an appropriate temp directory.

To run for all versions in a VOB:

On Windows:
cd <vob-tag>   (in a dynamic view drive)

ccperl %TEMP%\ck_ver_cltxt_len.pl  > %TEMP%\ck_ver_cltxt_len.log


On UNIX/Linux:
cleartool setview <view-tag>

cd <vob-tag>

Perl /tmp/ck_ver_cltxt_len.pl  > /tmp/ck_ver_cltxt_len.log


To run for all versions of a particular elemet type in a VOB (your custom element type or binary_delta_file):

On Windows:
cd <vob-tag>   (in a dynamic view drive)

cleartool find -all -type file -element "eltype(type-name)" -exec "ccperl %TEMP%\ck_ver_cltxt_len.pl \"%CLEARCASE_PN%\" >> %TEMP%\ck_ver_cltxt_len.log"


On UNIX/Linux:
cleartool setview <view-tag>

cd <vob-tag>

cleartool find -all -type file -element 'eltype(type-name)' -exec 'Perl /tmp/ck_ver_cltxt_len.pl $CLEARCASE_PN >> /tmp/ck_ver_cltxt_len.log'


Scan the log file (ck_ver_cltxt_len.log in the above example) for the string 'ERRORS DETECTED'.


Recovery of lost data


If data loss is detected, the only way to recover it is from backups.

Important Note: Ensure that you stop the overwrite or removal of old backups in the event they are needed for data recovery.

Contact IBM Rational Client support to request assistance with the recovery.


ck_ver_cltxt_len.pl

[{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Type Manager","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"7.1;7.1.0.1;7.1.0.2;7.1.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
23 June 2018

UID

swg21415461