[p4] Convert static to automatic labels

Jamie.Echlin at barclayscapital.com Jamie.Echlin at barclayscapital.com
Thu Aug 20 03:20:24 PDT 2009


This problem is quite involved. Feel free to answer any part of it ;-)

Our db.labels table is large, varying from 60-70 G, and growing rapidly
... we get some back after a rebuild from checkpoint, suggesting
additions and deletions.

I'm looking at converting the static to auto labels where possible.

Q1. Is this likely to have a positive affect on overall performance,
other than querying labels etc? I suppose this happens when viewing the
rev graph for instance.

I know it causes us problems when checkpointing and restoring, but I'm
interested in if there will be any user-perceived improvement.

The script works by, for each label spec, for each element of the View,
working out the deepest path in which all labels are under. It puts all
labelled files in a set (s1).

It then takes the highest change list that comprises all revisions, and
for all of these deepest paths, adds these elements to a set (s2).

If s1 is entirely a subset of s2, this can be converted to an automatic
label. s1 and s2 are not always the same - s2 may incorporate more
revisions than s1, the labelled set. That is one of the drawbacks of
this approach. It will often include deleted files which sometimes seem
not to be labelled, and may include other files too.

The table consists of 391M records. In running the script in preview
mode, it tells me how many total records can be deleted, and how many
would remain because the labels can't be converted. However, this only
reports around 3M records total, whereas it should tell me 391M.

Q2. Does anyone know why? Can db.label records get orphaned somehow? For
example if the label spec is changed to a narrower scope after

PS. I am dealing with the problem of new static labels, it's the
historical problem I want to fix.

Thanks a lot.


This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing.  Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent from other members of the Barclays Group.

More information about the perforce-user mailing list