Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPP: bulk transfer - must retain the number of contacts #746

Closed
vohmar opened this issue Feb 28, 2018 · 9 comments
Closed

REPP: bulk transfer - must retain the number of contacts #746

vohmar opened this issue Feb 28, 2018 · 9 comments
Assignees

Comments

@vohmar
Copy link
Contributor

vohmar commented Feb 28, 2018

Bulk transfer currently reuses the contacts only in context of one domain that is transferred. But in case multiple domains had the same contact object associated, the reuse is not retained and new objects are created for all the transferred domains. That creates a problem for the further updates ie bulk change of tech contact.

The number of contact objects must not be bigger as a result of bulk transfer in comparison to the number of contact objects that were associated with transferred domains with previous registrar.

Bonus points for reducing the number of contact objects - force re-usage of contact objects with identical data (name, ident, ident_type, ident_cc, phone nr, email address, statuses).

@vohmar vohmar added the bug label Feb 28, 2018
@vohmar vohmar added enhancement and removed bug labels Mar 1, 2018
artur-intech pushed a commit that referenced this issue Mar 2, 2018
artur-intech pushed a commit that referenced this issue Mar 2, 2018
@artur-intech
Copy link
Contributor

artur-intech commented Mar 3, 2018

  • Reuse is possible only within the same registrar, right?
  • How about postal address? I don't think contacts with different addresses should be consider identical
  • How about enforcing the same reuse logic in EPP (contact:create, domain:create/update)

artur-intech pushed a commit that referenced this issue Mar 3, 2018
artur-intech pushed a commit that referenced this issue Mar 3, 2018
@vohmar
Copy link
Contributor Author

vohmar commented Mar 5, 2018

  • automatic reuse is allowed only within the same registrar
  • only the contacts that have identical data sets are considered identical - if address processing is enabled then that also includes postal address
  • Enforcing reuse on domain/contact create/update is not trivial - topic for separate ticket

@artur-intech
Copy link
Contributor

artur-intech commented Mar 5, 2018

Is it ok to include reuse in EPP domain:transfer?

@vohmar
Copy link
Contributor Author

vohmar commented Mar 5, 2018

current ticket is about repp bulk transfer but basically yes it is OK to reuse existing contacts on epp transfer as well - but it must be validated first how much this will slow down the transfer process

artur-intech pushed a commit that referenced this issue Mar 5, 2018
@artur-intech
Copy link
Contributor

only the contacts that have identical data sets are considered identical - if address processing is enabled then that also includes postal address

Is there anything else besides what is mentioned above incl. address?

@artur-intech
Copy link
Contributor

Timo:

fax, org_name

artur-intech pushed a commit that referenced this issue Mar 6, 2018
artur-intech pushed a commit that referenced this issue Mar 6, 2018
@artur-intech
Copy link
Contributor

artur-intech commented Mar 6, 2018

Registrar contact's reuse in EPP domain:transfer is added as well.

artur-intech pushed a commit that referenced this issue Mar 6, 2018
artur-intech pushed a commit that referenced this issue Mar 6, 2018
artur-intech pushed a commit that referenced this issue Mar 6, 2018
artur-intech pushed a commit that referenced this issue Mar 6, 2018
artur-intech pushed a commit that referenced this issue Mar 6, 2018
@artur-intech
Copy link
Contributor

if one contact has fax value of "", and another of NULL, they will not be considered identical, and therefore will not be reused.
#754

@artur-intech
Copy link
Contributor

artur-intech commented Mar 7, 2018

Performance metrics of contact reuse query (without address):

Given:
select count(*) from registrars; # 2
select count(*) from contacts; # 500000

When:
EXPLAIN ANALYZE SELECT "contacts".* FROM "contacts" WHERE "contacts"."name" = 'test' AND "contacts"."email" = 'test@test.com' AND "contacts"."phone" = '+123.456789' AND "contacts"."ident" = '37605030299' AND "contacts"."ident_type" = 'priv' AND "contacts"."ident_country_code" = 'EE' AND "contacts"."fax" IS NULL AND "contacts"."org_name" IS NULL AND (statuses = '{}'::character varying[]) AND "contacts"."registrar_id" = 1 AND ("contacts"."id" != 111);

Then:

QUERY PLAN
--
Index Scan using index_contacts_on_registrar_id_and_ident_type on contacts  (cost=0.42..7.89 rows=1 width=648) (actual time=0.063..0.063 rows=0 loops=1)
Index Cond: ((registrar_id = 1) AND ((ident_type)::text = 'priv'::text))
Filter: ((fax IS NULL) AND (org_name IS NULL) AND (id <> 111) AND ((name)::text = 'test'::text) AND ((email)::text = 'test@test.com'::text) AND ((phone)::text = '+123.456789'::text) AND ((ident)::text = '37605030299'::text) AND ((ident_country_code)::text = 'EE'::text) AND (statuses = '{}'::character varying[]))
Planning time: 2.811 ms
Execution time: 0.404 ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants