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

Race condition when doing a series of "duplicates" from one product #3207

Closed
TheCloneMaster opened this issue Oct 21, 2014 · 9 comments
Closed

Comments

@TheCloneMaster
Copy link
Contributor

Hi,

If you have another language loaded besides English, and do a series of duplicates from one "product" record, odoo will enter a race condition that will end up on "Exception: CPU time limit exceeded."

Steps to reproduce:
Check that you have installed another language besides English.
Open a product, and do a series of "duplicate" and "save". When you do this about 8 or 10 times, you will start noticing that duplication takes more and more time to complete.
If you continue duplicating and saving, you will end up with a nice "Exception: CPU time limit exceeded."

@antonylesuisse
Copy link
Contributor

Please follow the https://github.com/odoo/odoo/wiki/Contributing guidelines

What version ?

My intuition is that it's not a race condition but a problem related to the duplication of ir_translation records each time you do it the size double so after n runs it take 2**n. For n=10 it's 1024 time the normal time.

@TheCloneMaster
Copy link
Contributor Author

Hi,

I am trying this on V. 8.0...

Yes, it is related to ir_translation, I saw that later on the logs...
But why is it doing a 2**n duplication of labels?

Regards,
Mario
El 21/10/2014 01:16, "antonylesuisse" notifications@github.com escribió:

Please follow the https://github.com/odoo/odoo/wiki/Contributing
guidelines

What version ?

My intuition is that it's not a race condition but a problem related to
the duplication of ir_translation records each time you do it the size
double so after n runs it take 2**n. For n=10 it's 1024 time the normal
time.


Reply to this email directly or view it on GitHub
#3207 (comment).

@TheCloneMaster
Copy link
Contributor Author

So, is this 2**n explosion of labels translated a known issue when duplicating products? Or any record ?

@ccomb
Copy link
Contributor

ccomb commented Oct 31, 2014

thanks @rvalyi for pointing me to this bug. I actually spent time to analyse the problem and I have a pull request #3304 for issue #3272 which is similar.
My PR only prevents the unwanted duplication, not the performance issue. (But there is no more performance issue when there is no duplication)

@TheCloneMaster
Copy link
Contributor Author

Thanks Christophe for the Fix, and Raphaël for his constant monitoring on
issues... ;-)

I will try this out and will report back...

Regards,
-Mario

@ccomb
Copy link
Contributor

ccomb commented Nov 5, 2014

Cross-linking a related issue on launchpad : https://bugs.launchpad.net/openobject-server/+bug/705364

@ccomb
Copy link
Contributor

ccomb commented Nov 6, 2014

After resolution of #3272 I cannot reproduce this 2**n explosion. I guess it's fixed.

@mart-e
Copy link
Contributor

mart-e commented Nov 6, 2014

I confirm it seems that less translations are duplicated.
I am closing this but let us know if you can still reproduce this issue.

@mart-e mart-e closed this as completed Nov 6, 2014
@TheCloneMaster
Copy link
Contributor Author

Thanks Christophe and mart-e,

At least for our use case, it is gone. Will do some extra testing this weekend and will report back if any other issue arises...

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

No branches or pull requests

4 participants