-
Notifications
You must be signed in to change notification settings - Fork 24
merge 6.8: Fix pool preloading [CUSTOM] #43
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
merge 6.8: Fix pool preloading [CUSTOM] #43
Conversation
Fix PCLAS-300
jmousset
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
custom et pas preview ?
|
@mpaulmier Le préloading c'est un truc qui n'est que chez nous il me semble |
| def pre_load_database(name): | ||
| def load(): | ||
| with Transaction().start(name, 0): | ||
| Pool(name).init() | ||
| return load |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je ne comprends pas le lien entre ce changement et le fait que la pool ne soit pas chargée deux fois.
Car a priori ce qui fait le travail c'est le test sur WERKZEUG_RUN_MAIN juste un poil au dessus.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Le fait de ne pas créer de transaction fait que le thread de cache n'est pas spawn au bon moment. Du coup, comme pour l'autre problème, il commence par reset la pool au démarrage
| # The problem is that the cache listener will be started as soon as the | ||
| # transaction is created, and its first action will be to stop the pool | ||
| # / clear the caches. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that this concurrency had been fixed by f258162 could it be the Transaction.start from pre_load_database from this patch that added back another way to have the issue?
…TOM] PR: coopengo#43 Fix #7859
nicoe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Au final la solution sera probablement plutôt https://foss.heptapod.net/tryton/tryton/-/issues/11401#note_331051
Mais go go
Real fix will probably be https://foss.heptapod.net/tryton/tryton/-/issues/11401#note_331051 Fix PCLAS-300
…TOM] PR: coopengo#43 Fix #7859
Real fix will probably be https://foss.heptapod.net/tryton/tryton/-/issues/11401#note_331051 Fix PCLAS-300
…TOM] PR: coopengo#43 Fix #7859
…TOM] PR: coopengo#43 Fix #7859
…TOM] PR: coopengo#43 Fix #7859
Fix PCLAS-300