CM wiki web
Limitations in Cascading Branches
Summary
The string length of the version extended path is a limiting factor.Above 128 characters, the processing time doubles.
Above 1024, the processing fails.
Tested with 2003.06.00, patches 37 and 43
Results
Since the beginning, I got some spurious error at every step, within the mkbranch command:cleartool: Error: Operation "view_gpath" failed: error in configuration specification. cleartool: Error: Unable to get pathname for VOB file system object - error in configuration specification cleartool: Warning: Unable to set process action variable for newly created object - afterwards-actions will not be executedSince no afterwards-actions were executed, this could be ignored. The timing was quite stable under 128, when the system time doubled, after which it remained stable until 1024:
real 0m1.433s
user 0m0.120s
sys 0m0.140s
48
real 0m1.245s
user 0m0.140s
sys 0m0.170s
56
real 0m1.055s
user 0m0.130s
sys 0m0.160s
64
real 0m1.037s
user 0m0.110s
sys 0m0.180s
72
...
real 0m2.926s
user 0m0.140s
sys 0m0.170s
128
real 0m2.394s
user 0m0.230s
sys 0m0.330s
144
real 0m2.467s
user 0m0.300s
sys 0m0.310s
152
...
real 0m3.441s
user 0m0.290s
sys 0m0.270s
1024
Only then did I meet the expected error(s):
mvfs: error in the configuration specification for view emagiro see the vobrpc_server_log on host ieatx014 for details mvfs: error in the configuration specification for view emagiro see the vobrpc_server_log on host ieatx014 for details mvfs: error in the configuration specification for view emagiro see the vobrpc_server_log on host ieatx014 for details mvfs: error in the configuration specification for view emagiro see the vobrpc_server_log on host ieatx014 for details mvfs: error in the configuration specification for view emagiro see the vobrpc_server_log on host ieatx014 for details mvfs: error in the configuration specification for view emagiro see the vobrpc_server_log on host ieatx014 for details cleartool: Error: Branch to checkout must be identified. cleartool: Error: Unable to check out "foo". mvfs: error in the configuration specification for view emagiro see the vobrpc_server_log on host ieatx014 for details bash: foo: I/O error mvfs: error in the configuration specification for view emagiro see the vobrpc_server_log on host ieatx014 for details mvfs: error in the configuration specification for view emagiro see the vobrpc_server_log on host ieatx014 for details mvfs: error in the configuration specification for view emagiro see the vobrpc_server_log on host ieatx014 for details mvfs: error in the configuration specification for view emagiro see the vobrpc_server_log on host ieatx014 for details casc> ct getlog -last 3 error ============================================================================= Log Name: error Hostname: eeiatuc216 Date: 14-Mar-08.12:59:57 Selection: Last 3 lines of log displayed ----------------------------------------------------------------------------- Fri Mar 14 12:58:05 2008. host "eeiatuc216", pid 13410, user "emagiro" Internal Error detected in "../branch.c" line 82 cleartool: Error: String buffer too small. ============================================================================= casc> ct getlog -last 2 mvfs ============================================================================= Log Name: mvfs Hostname: eeiatuc216 Date: 14-Mar-08.13:03:51 Selection: Last 2 lines of log displayed ----------------------------------------------------------------------------- 03/14/08 12:56:32 mvfs(0): Error: see the vobrpc_server_log on host ieatx014 for details 03/14/08 12:56:32 mvfs(0): Error: error in the config specification for view emagiro ============================================================================= casc> ct getlog -last 1 -host ieatx014 vobrpc ============================================================================= Log Name: vobrpc Hostname: ieatx014 Date: 14-Mar-08.13:04:28 Selection: Last 1 lines of log displayed ----------------------------------------------------------------------------- 03/14/08 12:56:32 vobrpc_server(19777): Error: INTERNAL ERROR detected and logged in "/var/adm/rational/clearcase/log/error_log". ============================================================================= casc> ct getlog -last 1 -host ieatx014 error ============================================================================= Log Name: error Hostname: ieatx014 Date: 14-Mar-08.13:05:01 Selection: Last 1 lines of log displayed ----------------------------------------------------------------------------- vobrpc_server(19777): Error: String buffer too small. =============================================================================
Setup
One element: foo, text file into which I write a step indexOne
-pbranch branch type: cascade, the name of which is 7 chars long, plus the / separator, this gives a length increment of 8 chars per step.
One rule in the config spec, which needs to be upgraded at every step, because a simple pattern specification using the per branch branch type (such as the initial one) would be ambiguous.
I run a compound one line shell command in a loop, after an initialization:
casc> touch foo casc> ct mkelem -nc -rm -ci foo casc> ct mkbrtype -pbr -c 'cascading test' cascade casc> ct setcs /tmp/cs casc> ct catcs element * CHECKEDOUT element * .../cascade/LATEST element * .../mg/LATEST element * /main/LATEST -mkbranch mg casc> let j=0 casc> let i=0; while [ $i -lt 10 ]; do let i=i+1; let j=j+1; echo $i; time bash -c "cleartool mkbranch -nc -nco cascade foo; perl -pi -e 's@/cascade/LATEST@/cascade/cascade/LATEST@' /tmp/cs; cleartool setcs /tmp/cs; cleartool co -nc foo; echo $j > foo; cleartool ci -nc foo"; cleartool des -s foo | wc -c; doneIn more detail:
- j: the overall step counter, initialized to 0 once in the beginning:
let j=0. Incremented in every loop:let j=j+1; - i: the loop counter; I control the length of the loop from the command line to try to stop after the first error. Set to 0 at every run:
let i=0. Tested against a loop count which I set to different values:[ $i -lt 10 ]. Incremented in the beginning of every loop:let i=i+1;. Printed at every loop, to allow some control:echo $i; - Then, I use time to print the overall duration of a compound shell command (3 usual dimensions)
- The compound command, passed quoted to a sub-shell:
bash -c "...", splits as follows:- Make a new cascaded branch, using the same branch type, but avoiding to checkout, which would fail, since the config spec rule suitable to select the version before the command, is not suitable after it:
cleartool mkbranch -nc -nco cascade foo - Edit the file we'll use to set the config spec, by adding one level of /cascade to the specification rule. This is done using the in-place edition option of perl, with a regexp replacement:
perl -pi -e 's@/cascade/LATEST@/cascade/cascade/LATEST@' /tmp/cs
- Modify the config spec from the file previously updated:
cleartool setcs /tmp/cs - Check out:
cleartool co -nc foo - Modify the contents (by printing the index):
echo $j > foo - Check in:
cleartool ci -nc foo - Print the length (in number of chars) of the version specification:
cleartool des -s foo | wc -c
- Make a new cascaded branch, using the same branch type, but avoiding to checkout, which would fail, since the config spec rule suitable to select the version before the command, is not suitable after it:
Cleanup
I removed the last branch, and the rule in the config spec. -- MarcGirod - 27 Mar 2008Edit • Attach • Print version • History: r2 < r1 • Backlinks • Raw View • Raw edit • More topic actions
