|Title||Bugzilla integration is slow if many users don't match up|
|Assigned user||Nick Barnes|
|Description||If there are Bugzilla user records which don't correspond to Perforce user record, or Perforce user records which don't correspond to Bugzilla user records, and one of these users appears in a bug or job to be replicated, then the P4DTI requests all user records from both Perforce and Bugzilla (to rebuild its internal user translation tables). This may take several seconds. If there are many such records to be replicated on a given poll (for instance, the first poll) then the P4DTI repeats this request many times. This may make the replication exceedingly slow.|
Note that the AG says (section 3.5) that administrator's "must ensure that the P4DTI can work out how users in the defect tracker correspond to users in Perforce". There's no reason not to add Perforce users to Bugzilla. However, this may still be a problem for organisations which have a lot of people (e.g. support staff) using Bugzilla (e.g. adding bugs) who are not Perforce users.
|Analysis||The P4DTI translates Bugzilla user identifiers into Perforce user identifiers, and vice versa, by comparing email addresses. It constructs tables for this translation when it starts up (see dt_bugzilla.user_translator.init_users()), and sends email to the administrator listing user records which cannot be translated.|
If the P4DTI tries to translate a user identifier which is not in these tables, it rebuilds the tables (by querying Perforce and Bugzilla for all their user records again), so it can handle a user record being added while the P4DTI is running.
The P4DTI should clear a flag at the start of each poll, and set the flag when it rebuilds the user translation tables. If a user lookup fails and the flag is set, it should fall straight through to the "can't translate this user" case. It should also record this in the translation tables.
|Evidence||Noticed while testing masters.|
|Created by||Nick Barnes|
|Created on||2001-10-26 11:17:59|
|Last modified by||Nick Barnes|
|Last modified on||2018-07-05 17:27:48|
|History||2001-10-26 NB Created.|
2018-07-05 NB Suspended because the P4DTI is obsolete.