Why does RTC allow duplicate workspace names?
I always wondered why RTC allows duplicate workspace names. Why can't RTC prefix the short RTC user ID (SK for Sunil Kuuram) to the workspace name when I create a new workspace? That won't make the workspace name longer.
This raises confusions for novice users. SCM command line seems not so popular at the moment, but workspaces fail to load due to ambiguity once developers start working on unix. They need to go back to find and rename their workspaces.
Thanks
Sunil
Accepted answer
If you want to make things like names unique it drains performance, because you always have to look up all existing objects. If you add distributed SCM, how is the system supposed to be able to keep names unique anyway, except on one server?
For components on the server, there is an option to keep names unique. You have to enable it in the server and it will slow down component creation, I assume.
Comments
Can you elaborate on the statement:
it will slow down component creation, I assume.
To my knowledge, it is not a performance issue (that information is indexed and quickly looked up). In a non-hierarchical namespace (such as workspace, component, and stream namespaces), there is tension between guaranteeing uniqueness, and having easy-to-remember names for commonly used objects. I personally am in favor of at least warning on duplicate names, and based on customer demand, this was introduced for components, but in order not to break backward compatibility, it was introduced as an option in the Advanced Properties page of the CCM application.
It is likely indexed by UUID and not by the display name. We have other places where globally unique display name enforcement has been added only recently e.g for components.
Ralph's statement about distributed SCM is correct - enforcing uniqueness of names in a distributed environment isn't practical. Over time, environments tend to become distributed, so we've avoided making guarantees or promises about it, since those will eventually break.
it will slow down component creation, I assume.Is this the case, or you are just speculating.
Ralph's speculation is correct. Performance was a consideration when we looked at naming uniqueness. Having said that, component and workspace names are indexed, so the lookup is quick, but it still costs some time.
One other answer
For components on the server, there is an option to keep names unique.
What is the name of this Advanced Property in RTC? Is there any IBM documentation for this property?
Are there any other Advanced Properties that we should look at for forcing name uniqueness for other items?
Comments
It is
......./ccm/admin#action=com.ibm.team.repository.admin.configureAdvanced
and then you search (browser search) for component. The entry is named "Encourage component names to be unique. " the property ID is unfortunately not visible there, it is com.ibm.team.scm.discourage.duplicate.component.names=true
1 vote
Comments
sam detweiler
Feb 11 '15, 10:30 a.m.how is there ambiguity? the workspaces are BY USER.. so you can't see mine and I can't see yours.. (by default)