Tryton - Issues

 

Issue6365

Title Keys used for get - set the translation_cache are different
Priority bug Status testing
Superseder Nosy List ced, jcavallo, pokoli, reviewbot
Type behavior Components trytond
Assigned To jcavallo Keywords review
Reviews 33221002
View: 33221002

Created on 2017-03-15.16:01:45 by jcavallo, last changed by reviewbot.

Messages
review33221002 updated at https://codereview.tryton.org/33221002/#ps40001
msg32529 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-03-16.09:24:19
I'm raising this from performance issue to behavior because there is a chance that wrong cache value is picked if there is collisions between the different keys.
msg32526 (view) Author: [hidden] (jcavallo) Date: 2017-03-15.16:55:29
According to this commit [1], the problem already existed in 2008.

[1] http://hg.tryton.org/trytond/rev/e0738afee542
msg32525 (view) Author: [hidden] (pokoli) (Tryton committer) Date: 2017-03-15.16:08:45
Do you know in which changeset it was introduced? 

P.S: If you are working on the issue please assign it to yourself.
msg32524 (view) Author: [hidden] (jcavallo) Date: 2017-03-15.16:01:44
The key used to get the translated values in the cache is :

(lang, ttype, name, source)

When setting the value, the key becomes :

(name, ttype, lang, source)

So the cache is actually never used.
History
Date User Action Args
2017-03-16 11:03:03reviewbotsetnosy: + reviewbot
messages: + msg32531
2017-03-16 09:24:19cedsettype: performance -> behavior
messages: + msg32529
nosy: + ced
2017-03-15 16:55:30jcavallosetassignedto: jcavallo
messages: + msg32526
2017-03-15 16:08:45pokolisetnosy: + pokoli
messages: + msg32525
2017-03-15 16:01:45jcavallocreate

Showing 10 items. Show all history (warning: this could be VERY long)