This commit is contained in:
Bojan Serafimov
2023-11-21 12:15:49 -05:00
parent 65eb48aab7
commit c4af96ee7e
5 changed files with 7 additions and 421 deletions

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 80 KiB

View File

@@ -677,13 +677,12 @@ fn start_pageserver(
signal.name()
);
#[cfg(feature = "profiling")]
pageserver::profiling::exit_profiler(&profiler_guard);
std::process::exit(111);
}
Signal::Quit | Signal::Interrupt | Signal::Terminate => {
Signal::Interrupt | Signal::Terminate => {
info!(
"Got {}. Terminating gracefully in fast shutdown mode",
signal.name()
@@ -696,7 +695,6 @@ fn start_pageserver(
let bg_remote_storage = remote_storage.clone();
let bg_deletion_queue = deletion_queue.clone();
#[cfg(feature = "profiling")]
pageserver::profiling::exit_profiler(&profiler_guard);
BACKGROUND_RUNTIME.block_on(pageserver::shutdown_pageserver(

View File

@@ -655,9 +655,13 @@ mod tests {
let started_at = std::time::Instant::now();
// Feed bytes to the decoder
// TODO try feeding in many small chunks
let xlogoff: usize = startpoint.segment_offset(WAL_SEGMENT_SIZE);
let mut decoder = WalStreamDecoder::new(startpoint, pg_version);
decoder.feed_bytes(&bytes[xlogoff..]);
// decoder.feed_bytes(&bytes[xlogoff..]);
for chunk in bytes[xlogoff..].chunks(50) {
decoder.feed_bytes(chunk);
}
println!("decoding {} bytes", bytes.len() - xlogoff);
// Decode and ingest wal
@@ -674,7 +678,6 @@ mod tests {
println!("done in {:?}", duration);
drop(prof_guard);
#[cfg(feature = "profiling")]
crate::profiling::exit_profiler(&profiler_guard);
Ok(())

View File

@@ -83,5 +83,5 @@ mod profiling_impl {
None
}
// pub fn exit_profiler(profiler_guard: &Option<pprof::ProfilerGuard>) {}
pub fn exit_profiler(profiler_guard: &Option<DummyProfilerGuard>) {}
}

View File

@@ -356,7 +356,6 @@ mod tests {
round_trip_test::<false>(&blobs).await?;
round_trip_test::<true>(&blobs).await?;
#[cfg(feature = "profiling")]
crate::profiling::exit_profiler(&profiler_guard);
Ok(())
}