Commit Graph
5299 Commits
Author SHA1 Message Date
Cédric Krier a4eb342cd7 Retry to get a connection when an OperationalError is raised
If there are no connection available in the pool, psycopg2 tries to create a
new connection but it may raise an OperationalError if the server close it.

Closes #13475
2024-08-26 09:33:58 +02:00
Nicolas Évrard 428825ac6a Use JSONB to store MultiSelection field by default
Closes #11513
2024-09-02 11:25:49 +02:00
Nicolas Évrard 1fbcf70283 Apply the function field searcher transformation before doing any optimization
This allows to use the OR-to-UNION optimization if the searcher returns only
local columns.
2024-06-27 19:15:07 +02:00
Nicolas Évrard 02f054bd26 Check the return type of Function fields searchers 2024-06-28 15:38:46 +02:00
Nicolas Évrard 6512d36bd1 Rely on the tables dict to choose when to apply the OR-to-UNION optimization
The dict changes in size if non-local columns are used to order the search
results.

Closes #13346
2024-06-13 18:57:14 +02:00
Nicolas Évrard a11522ffd6 Externalize the method to apply sorting on order tuples 2024-06-27 18:09:07 +02:00
Nicolas Évrard 53bb613564 Implement __deepcopy__ on ImmutableDict
Closes #13408
2024-07-19 19:04:01 +02:00
Cédric Krier a2dfc4455b Refine index definition
- Set low and high cardinality to index usage
- Use Range usage for numerical expression instead of Equality
2024-07-27 18:36:14 +02:00
Cédric Krier 234daa0f99 Add cardinality option to Index Usage
Closes #13426
2024-07-27 17:49:13 +02:00
Cédric Krier 084cd424ce Use more accurate threshold between update or rebuild of MPTT
Closes #13422
2024-07-27 11:55:20 +02:00
Cédric Krier 01574e6700 Add searcher to summary fields
Closes #13401
2024-07-18 10:12:04 +02:00
Cédric Krier e84fec0f84 Close connection when listing or testing PostgreSQL databases
Closes #13441
2024-08-07 17:49:10 +02:00
Cédric Krier 17476c5844 Return definition translations from the underlying field of Function field
Closes #13356
2024-06-21 18:49:51 +02:00
Cédric KrierandDavid Harper 67bfcde06f Update documentation of infrastructure
Co-authored-by: David Harper <dave@libateq.org>
2024-08-07 23:24:57 +02:00
Cédric Krier a080a11b3e Allow configuring TinyMCE license key 2024-06-25 09:37:31 +02:00
Cédric Krier 629c864ff0 Use max_content_length of werkzeug Request
Werkzeug provides a way to restrict request content size which does not rely
on Content-Length header.
2024-05-05 00:18:23 +02:00
Cédric Krier 9f4885629a Do not hide HTTP Exception in RPC protocols 2024-05-05 00:06:09 +02:00
Cédric Krier 127c93caaa Select only id from query of ModelSQL.search
Closes #13421
2024-07-26 23:00:05 +02:00
Cédric Krier f5d32c78b6 Do not update indexes if not explicitly requested or modules are not updated
Closes #13400
2024-07-22 18:22:29 +02:00
Cédric Krier df1fdfaf0d Do not store empty list for MultiSelection key of Dict
Closes #13376
2024-06-30 01:55:55 +02:00
Cédric Krier 6e2c910539 Fix typo in numeric field comments 2024-07-13 15:35:33 +02:00
Cédric Krier d78dfc75a8 Cast numeric columns for order expression on SQLite
Closes #13397
2024-07-13 15:35:01 +02:00
Sergi Almacellas Abellana 0bcfb7b427 Add warning to backup database before update 2024-07-13 12:14:29 +02:00
Cédric Krier 19fc61e696 Commit reaadonly transaction before starting the new transaction for indexes
The readonly transaction used to load modules may have read lock that dead
locks the new transaction to create indexes.

Closes #13347
2024-06-18 20:42:13 +02:00
Cédric Krier 85a5a09a53 Fill models with indexes when database is not updated but indexes
Closes #13347
2024-06-18 20:41:06 +02:00
Cédric Krier 5823bce6cf Add tools to apply types to SQLite select queries 2024-07-04 08:45:19 +02:00
Cédric Krier f5e33378be Set type declaration in column names of SQLite only on top-level query
Closes #12532
2024-06-30 16:25:41 +02:00
Juan Jose Pablos fbe87b99c8 Replace link to configuration document by ref to labels 2024-07-08 19:00:26 +02:00
Cédric Krier 79901931fc Use decompress method from gzip 2024-05-04 18:46:01 +02:00
Cédric Krier 5af12a226e Compress RPC responses
Closes #13235
2024-05-04 18:43:27 +02:00
Cédric Krier f0b1c9d590 Align label in the middle of image 2024-06-25 12:28:11 +02:00
Cédric Krier 575d1d0132 Change _changed_values and _save_values properties to method
Closes #13317
2024-06-09 19:54:52 +02:00
Cédric Krier 95f9a21426 Add default timeout to read and export_data RPC entries
Closes #13218
2024-04-26 12:30:49 +02:00
Cédric Krier bd9be5aace Add transaction timeout to export data route
Closes #13217
2024-04-26 12:30:11 +02:00
Cédric Krier b47072feb8 Add timeout option to with_transaction wrapper 2024-04-26 12:29:34 +02:00
Cédric Krier 5fa6e8533b Add missing documentation of ExtensionTestCase 2024-06-09 12:45:58 +02:00
Cédric Krier 36f3adca1e Add TestCase to filter warnings with TEST_PYTHONWARNINGS 2024-06-09 12:45:39 +02:00
Cédric Krier 685411cf9a Catch and test warning for using an unsaved relation record 2024-06-08 17:37:35 +02:00
Cédric Krier 11ef2ba54c Replace deprecated datetime.utcnow usage
Closes #12647
2024-06-15 11:01:41 +02:00
Cédric Krier 951001cd35 Remove warnings for unsupported features of SQLite table handler
There is no need to raise warnings as the API is called by ModelSQL and the
user has not control over it.
2024-06-08 17:21:59 +02:00
Cédric Krier 5b253450a3 Fix test_set_key of FieldDictTestCase
Closes #13314
2024-06-08 17:19:40 +02:00
Cédric Krier 5b17010a9f Replace default sqlite3 adapters and converters
The defaults are deprecated since Python 3.12

Closes #13313
2024-06-08 17:18:03 +02:00
Cédric Krier 71c4f6e185 Add configuration for report convert command
Closes #13292
2024-05-31 19:35:02 +02:00
Cédric Krier cd1c57dddf Use UPSERT to update cache 2024-06-23 08:39:41 +02:00
Cédric Krier c1310f677a Add unique constraint on cache name 2024-03-30 16:13:30 +01:00
Cédric Krier 7dfd4292e9 Remove extra query that retrieve cache timestamp twice 2024-03-30 16:09:07 +01:00
Cédric Krier c028397262 Try to update next call of skipped cron tasks 2024-05-08 10:07:09 +02:00
Cédric Krier a84cb45141 Compute next call of cron task using actual now
If the cron task took more time then the repeating delay, it is not useful to
reschedule it in the past.
2024-04-03 16:30:46 +02:00
Cédric Krier 339ee1867d Use process pool to run cron
Closes #13053
2024-04-03 16:28:22 +02:00
Cédric Krier f9b50f16bf Lock only running cron record
A single transaction is used to lock, run and update the cron record.
Only the cron run is locked so other cron processes could run other cron
tasks.
When fixing transaction, we ensure that the same cron record is selected again
otherwise we restart with an empty transaction setup the selection process.
If a cron record fails to execute, it is ignored from the selection for this
run.
The run stops once there is no cron record that can be selected.

Closes #13158
2024-05-07 19:44:35 +02:00