P4DTI issue job000414

TitleBugzilla integration is slow if many users don't match up
Assigned userNick Barnes
DescriptionIf 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.
AnalysisThe 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.
How foundmanual_test
EvidenceNoticed while testing masters.
Observed in1.2.1
Introduced in0.5.0
Created byNick Barnes
Created on2001-10-26 11:17:59
Last modified byNick Barnes
Last modified on2018-07-05 17:27:48
History2001-10-26 NB Created.
       2018-07-05 NB Suspended because the P4DTI is obsolete.