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

Change make_permalink behaviour #2341

Merged
merged 4 commits into from
Nov 23, 2017
Merged

Conversation

jhawthorn
Copy link
Contributor

@jhawthorn jhawthorn commented Nov 1, 2017

The behaviour here wasn't what anyone wanted (fixing duplicate generated identifiers by appending -1, -2, etc) and had major performance issues (selecting orders LIKE "R123123%" inside of a lock).

This removes make_permalink from Order, which has its own number generator, which we should use exclusively.

This replaces the old make_permalink behaviour in favour of generating a brand new permalink if one already exists.

Thanks @jarednorman for discovering the performance issue.

@jhawthorn jhawthorn added the WIP label Nov 1, 2017
Order has its own logic for generating permalinks, we should use that
exclusively.
This lock was well-intentionned, but doesn't do anything to reduce the
likelyhood of a duplicate permalink.
@jhawthorn jhawthorn removed the WIP label Nov 2, 2017
Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had the same issue and removing make_permalink from Order is fixing the performance issue.

@jhawthorn jhawthorn merged commit 1c4fed7 into solidusio:master Nov 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants