mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-09 14:32:57 +00:00
storcon: eagerly attempt autosplits (#10849)
## Problem Autosplits are crucial for bulk ingest performance. However, autosplits were only attempted when there was no other pending work. This could cause e.g. mass AZ affinity violations following Pageserver restarts to starve out autosplits for hours. Resolves #10762. ## Summary of changes Always attempt autosplits in the background reconciliation loop, regardless of other pending work.
This commit is contained in:
@@ -1031,12 +1031,11 @@ impl Service {
|
||||
let reconciles_spawned = self.reconcile_all();
|
||||
if reconciles_spawned == 0 {
|
||||
// Run optimizer only when we didn't find any other work to do
|
||||
let optimizations = self.optimize_all().await;
|
||||
if optimizations == 0 {
|
||||
// Run new splits only when no optimizations are pending
|
||||
self.autosplit_tenants().await;
|
||||
}
|
||||
self.optimize_all().await;
|
||||
}
|
||||
// Always attempt autosplits. Sharding is crucial for bulk ingest performance, so we
|
||||
// must be responsive when new projects begin ingesting and reach the threshold.
|
||||
self.autosplit_tenants().await;
|
||||
}
|
||||
_ = self.reconcilers_cancel.cancelled() => return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user