When a process change the list of activated modules, the others must refresh
their pool. We do that by just stopping the pool for that database, the next
request will load the new pool.
issue8988
review302861002
As we rollback the cache modification when loading a module, we must clear all
of them at the end to ensure to not keep outdated data.
issue9759
review339421002
By using a class with slots instead of standard dict, we can reduce a lot the
memory usage to store the record data in the caches and values.
Also we can rely on the data in the cache to exist only for real field which
can be used to create a fast path in ModelStorage.__getattr__.
As now storing data in the cache has no extra cost, we can store data from the
transactional cache in the local. This allow also to have a shorter path in
ModelStorage.__getattr__.
For more memory efficiency, we remove the record from the cache instead of
clearing them. It was better to clear a dict but a record is less expensive to
re-instantiate than clearing.
issue9369
issue9225
review297861002
The price_decimal stored in ir.configuration is checked against the current
configuration value. We do not allow to start serving a database for which the
values are different as it may be due to a misconfiguration which can lead to
data corruption.
issue9324
review317381002
We add the flake8 configuration used so we ensure everyone uses the same.
We remove the usage of __all__ for non public API.
When possible, we rationalize the class name according to its __name__ and module.
issue9082
review297061002
The table is a hot spot for contention so we must minimize the duration lock
are kept on it. As at the start of a transaction, the cache may be sync and so
it locks all the row in the table, the transaction used for this query should
not be the main one that lasts a long time. Idem for the commit.
issue8447
review283591002
- remove invalid escape sequence
- use read_file instead of read_fp
- use importlib instead of imp and __import__
- use callable instead of instance of collections.Callable
- fix silent file closing
- replace SafeConfigParser by ConfigParser
- replace decodestring by decodebytes
- replace encodestring by encodebytes
issue7666
issue7390
review53361004
There is no need to create the graph step by step with only dependencies
already registered as far as the depth computation is propagated to all the
children.
Instead of searching level by level the nodes to iterate, it is faster to use
the sort of Python.
create_graph does not need to return its internal states but only the graph.
The ir.module activate and update method does not need to check for missing
dependencies because it is already checked at startup.
issue7466
review45211002
The same model can be registered multiple times by one module so the cleaning
can only happen when the all the classes have been registered.
issue7500
review53271002
This is done by calling first the getter method for the parent language for the
terms that are not yet cached. After existing translations are set for the
language. And finally the result is stored in the cache.
The synchronisation wizard remove also the translations that are identical to
their parent language.
The method load_module_graph adds all parent languages to be loaded for
derivation.
issue5443
review25581002
Cache.resets create a new transaction but SQLite keeps a lock from the previous
transaction is it was not committed.
This commit was removed by changeset 9b2e0aac2d9c
issue5388
review16071002
The sax parser expect a byte stream, so we must open the file with the binary
mode. Also file_open should have a default encoding to None because encoding
should not be set in binary mode.
issue5313