Tryton - Issues

 

Issue6365

Title Keys used for get - set the translation_cache are different
Priority bug Status resolved
Superseder Nosy List ced, jcavallo, pokoli, reviewbot, roundup-bot
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 roundup-bot.

Messages
New changeset f926d42f4ea1 by Jean Cavallo in branch '4.2':
Use same key for get and set in translation cache
http://hg.tryton.org/trytond/rev/f926d42f4ea1

New changeset d38baec15c1f by Jean Cavallo in branch '4.0':
Use same key for get and set in translation cache
http://hg.tryton.org/trytond/rev/d38baec15c1f

New changeset 987ef2bdc4d6 by Jean Cavallo in branch '3.8':
Use same key for get and set in translation cache
http://hg.tryton.org/trytond/rev/987ef2bdc4d6

New changeset f97c7db53775 by Jean Cavallo in branch '3.6':
Use same key for get and set in translation cache
http://hg.tryton.org/trytond/rev/f97c7db53775

New changeset b56d318ff9ea by Jean Cavallo in branch '3.4':
Use same key for get and set in translation cache
http://hg.tryton.org/trytond/rev/b56d318ff9ea
New changeset a82532cfbee3 by Jean Cavallo in branch 'default':
Use same key for get and set in translation cache
http://hg.tryton.org/trytond/rev/a82532cfbee3
review33221002 updated at https://codereview.tryton.org/33221002/#ps100001
review33221002 updated at https://codereview.tryton.org/33221002/#ps80001
review33221002 updated at https://codereview.tryton.org/33221002/#ps60001
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-04-06 12:40:12roundup-botsetmessages: + msg33136
2017-03-29 00:15:04roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg32878
2017-03-28 18:29:52reviewbotsetmessages: + msg32851
2017-03-28 17:37:42reviewbotsetmessages: + msg32848
2017-03-28 12:33:05reviewbotsetmessages: + msg32841
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)