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

[15.0][IMP] partner_event: Do registration creation in batch + remove savepoint #340

Merged

Conversation

pedrobaeza
Copy link
Member

@pedrobaeza pedrobaeza commented Aug 30, 2023

For speeding up the process. Specially the removal of the savepoints makes that Postgres don't go slow as hell. Check https://www.cybertec-postgresql.com/en/subtransactions-and-performance-in-postgresql/ for some rationale. The problem happens even releasing the previous savepoints.

As this module is very old, the reason for doing it this way and skip registrations with error is not fully known, but the view mentions about registration duplication, so let's avoid it and handle later other possible exceptions.

@Tecnativa TT26694

@pedrobaeza pedrobaeza added this to the 15.0 milestone Aug 30, 2023
Copy link
Contributor

@ivantodorovich ivantodorovich left a comment

Choose a reason for hiding this comment

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

👍🏻

You can probably remove the errors field, too.. it seems it was only used to store the error messages you've just removed.

…oint

For speeding up the process. Specially the removal of the savepoints
makes that Postgres don't go slow as hell. Check
https://www.cybertec-postgresql.com/en/subtransactions-and-performance-in-postgresql/
for some rationale. The problem happens even releasing the previous
savepoints.

As this module is very old, the reason for doing it this way and skip
registrations with error is not fully known, but the view mentions about
registration duplication, so let's avoid it and handle later other
possible exceptions.

TT26694
@pedrobaeza pedrobaeza force-pushed the 15.0-imp-partner_event-batch_registration branch from 9fe525d to 8f71814 Compare August 31, 2023 06:54
@pedrobaeza
Copy link
Member Author

While removing the errors field stuff, I see that in the view there's a mention saying about duplicates. Although there's no constraint for avoiding such duplication, there's not too much sense to register several times the same contact as attendee, so I'm now skipping these duplicates.

Do you see it correct? Should I put a constraint as well?

@ivantodorovich
Copy link
Contributor

👍🏻 I think it's correct like this. If the partner is already registered, it make sense to simply skip it
The intention is to ensure the partners are registered, I guess

@pedrobaeza
Copy link
Member Author

OK, let's go for now improving this part:

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 15.0-ocabot-merge-pr-340-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit c724225 into OCA:15.0 Sep 5, 2023
6 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 0f6cca8. Thanks a lot for contributing to OCA. ❤️

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

Successfully merging this pull request may close these issues.

None yet

5 participants