mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-06-13 05:00:02 +02:00
feat: use XORM EngineGroup instead of single Engine connection (#7212)
Resolves #7207 Add new configuration to make XORM work with a main and replicas database instances. The follow configuration parameters were added: - `HOST_PRIMARY` - `HOST_REPLICAS` - `LOAD_BALANCE_POLICY`. Options: - `"WeightRandom"` -> `xorm.WeightRandomPolicy` - `"WeightRoundRobin` -> `WeightRoundRobinPolicy` - `"LeastCon"` -> `LeastConnPolicy` - `"RoundRobin"` -> `xorm.RoundRobinPolicy()` - default: `xorm.RandomPolicy()` - `LOAD_BALANCE_WEIGHTS` Co-authored-by: pat-s <patrick.schratz@gmail.com@> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7212 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: pat-s <patrick.schratz@gmail.com> Co-committed-by: pat-s <patrick.schratz@gmail.com>
This commit is contained in:
parent
a23d0453a3
commit
63a80bf2b9
19 changed files with 463 additions and 129 deletions
|
@ -364,6 +364,9 @@ var ignoredErrorMessage = []string{
|
|||
// TestDatabaseCollation
|
||||
`[E] [Error SQL Query] INSERT INTO test_collation_tbl (txt) VALUES ('main') []`,
|
||||
|
||||
// Test_CmdForgejo_Actions
|
||||
`DB: No dedicated replica host defined; falling back to primary DSN for replica connections`,
|
||||
|
||||
// TestDevtestErrorpages
|
||||
`ErrorPage() [E] Example error: Example error`,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue