mirror of
https://github.com/zhaofengli/attic.git
synced 2025-03-15 13:07:49 +00:00
Choose a more sensible limit for MySQL, suggested by @baloo
This commit is contained in:
parent
2705d1d90b
commit
d3ffcf885c
1 changed files with 2 additions and 2 deletions
|
@ -159,8 +159,8 @@ async fn run_reap_orphan_chunks(state: &State) -> Result<()> {
|
||||||
let storage = state.storage().await?;
|
let storage = state.storage().await?;
|
||||||
|
|
||||||
let orphan_chunk_limit = match db.get_database_backend() {
|
let orphan_chunk_limit = match db.get_database_backend() {
|
||||||
// Default value of --max-allowed-packet https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_max_allowed_packet
|
// Arbitrarily chosen sensible value since there's no good default to choose from for MySQL
|
||||||
sea_orm::DatabaseBackend::MySql => 67108864,
|
sea_orm::DatabaseBackend::MySql => 1000,
|
||||||
// Panic limit set by sqlx for postgresql: https://github.com/launchbadge/sqlx/issues/671#issuecomment-687043510
|
// Panic limit set by sqlx for postgresql: https://github.com/launchbadge/sqlx/issues/671#issuecomment-687043510
|
||||||
sea_orm::DatabaseBackend::Postgres => u64::from(u16::MAX),
|
sea_orm::DatabaseBackend::Postgres => u64::from(u16::MAX),
|
||||||
// Default statement limit imposed by sqlite: https://www.sqlite.org/limits.html#max_variable_number
|
// Default statement limit imposed by sqlite: https://www.sqlite.org/limits.html#max_variable_number
|
||||||
|
|
Loading…
Add table
Reference in a new issue