Skip to content

Conversation

@JCavallo
Copy link
Contributor

Fix PCLAS-300

Copy link
Member

@jmousset jmousset left a 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 ?

@JCavallo
Copy link
Contributor Author

@mpaulmier Le préloading c'est un truc qui n'est que chez nous il me semble

Comment on lines +48 to +52
def pre_load_database(name):
def load():
with Transaction().start(name, 0):
Pool(name).init()
return load
Copy link
Collaborator

@nicoe nicoe Sep 25, 2023

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.

Copy link
Contributor Author

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

Comment on lines +26 to +28
# 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.
Copy link
Collaborator

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?

PierreCookie pushed a commit to PierreCookie/tryton that referenced this pull request Sep 28, 2023
Copy link
Collaborator

@nicoe nicoe left a 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

@JCavallo JCavallo merged commit 8af2e6d into coopengo:master Oct 5, 2023
@JCavallo JCavallo deleted the PCLAS-300/fix_database_init branch October 5, 2023 20:35
JCavallo added a commit that referenced this pull request Oct 5, 2023
nicoe pushed a commit to nicoe/tryton-coopengo-new that referenced this pull request Sep 3, 2024
nicoe pushed a commit to nicoe/tryton-coopengo-new that referenced this pull request Sep 3, 2024
nicoe pushed a commit to nicoe/tryton-coopengo-new that referenced this pull request Jun 16, 2025
nicoe pushed a commit to nicoe/tryton-coopengo-new that referenced this pull request Jun 19, 2025
nicoe pushed a commit to nicoe/tryton-coopengo-new that referenced this pull request Sep 11, 2025
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

Successfully merging this pull request may close these issues.

4 participants