Skip to content

Commit 684d6ba

Browse files
committed
column-pager: log spill mechanism resolution for debugging
1 parent fc4a581 commit 684d6ba

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

src/compute/src/compute_state.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ impl ComputeState {
342342
let total = usize::cast_lossy(f64::cast_lossy(mem_limit) * fraction).max(128 * MIB);
343343

344344
if use_pool && apply_pool_config(enabled, total) {
345-
debug!(
345+
info!(
346346
enabled,
347347
fraction,
348348
mem_limit,
@@ -362,7 +362,7 @@ impl ComputeState {
362362
Backend::Swap
363363
};
364364

365-
debug!(
365+
info!(
366366
enabled,
367367
?backend,
368368
?codec,

src/storage/src/storage_state.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,10 @@ impl<'w> Worker<'w> {
854854

855855
let enabled = ENABLE_UPSERT_PAGED_SPILL
856856
.get(self.storage_state.storage_configuration.config_set());
857+
info!(
858+
worker = self.timely_worker.index(),
859+
enabled, "upsert stash pager: applying gate",
860+
);
857861
crate::upsert::upsert_stash_pager::set_enabled(enabled);
858862
}
859863
}

src/timely-util/src/column_pager.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,14 +428,18 @@ pub fn global_pager() -> ColumnPager {
428428
/// [`apply_tiered_config`]), so a consumer that captured a pager before a
429429
/// mechanism flip keeps its old one until it next calls here.
430430
pub fn shared_pager(enabled: bool) -> ColumnPager {
431+
let pool_mode = POOL_MODE.load(std::sync::atomic::Ordering::Relaxed);
431432
if !enabled {
433+
tracing::info!(enabled, pool_mode, "shared column pager resolved: disabled");
432434
return ColumnPager::disabled();
433435
}
434-
if POOL_MODE.load(std::sync::atomic::Ordering::Relaxed) {
436+
if pool_mode {
435437
if let Some(pool) = global_pool() {
438+
tracing::info!(enabled, pool_mode, "shared column pager resolved: pool");
436439
return ColumnPager::pooled(pool);
437440
}
438441
}
442+
tracing::info!(enabled, pool_mode, "shared column pager resolved: tiered");
439443
#[allow(clippy::clone_on_ref_ptr)]
440444
let dyn_policy: Arc<dyn PagingPolicy> = TIERED_POLICY.clone();
441445
ColumnPager::new(dyn_policy)

0 commit comments

Comments
 (0)