Skip to content
New issue

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

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

Already on GitHub? # to your account

EZP-26277: Content type copies generated identifiers are too long #1791

Conversation

alongosz
Copy link
Member

@alongosz alongosz commented Oct 3, 2016

Status: Ready for a review
Fixes: EZP-26277
Backported to: 6.4

This PR shortens generated identifiers of content type copies.
Instead of:
copy_of_<identifier>_<remoteId>
now we have:
cpy_<identifier>_<remoteId>

Also, <remoteId> is no longer a md5 hash but a sha1 hash shortened to 7 chars. We can't get rid of <remoteId> in copied content type identifier because it would be impossible to copy content type several times.

Another possible approaches:

  • Make database identifier field longer than 50 chars - as suggested in JIRA issue description. However AFAIK performance of varchar varies between DBMS-es and should be tested on large databases (about 2 mln of Content Objects).
  • Force API Consumer to specify copied content identifier. This is an API BC break and should not be considered for 6.x (IMHO).

TODO

  • Make copied content type identifier shorter.
  • Align tests and doc with this change.

@alongosz
Copy link
Member Author

alongosz commented Oct 3, 2016

Review ping @bdunogier @andrerom @pspanja

@andrerom andrerom changed the base branch from 6.4 to 6.5 October 11, 2016 13:18
@andrerom andrerom merged commit 822115e into ezsystems:6.5 Oct 11, 2016
@bdunogier
Copy link
Member

I was about to say that I'd change cpyto cp, as it is a known shorthand for copy, but obviously too late.

@alongosz alongosz deleted the ezp-26277-content-type-copies-identifiers-are-too-long branch October 14, 2016 12:39
# for free to join this conversation on GitHub. Already have an account? # to comment
Development

Successfully merging this pull request may close these issues.

5 participants