Update comments

This commit is contained in:
Konstantin Knizhnik
2021-04-22 11:46:20 +03:00
parent ed30f2096c
commit c5a8c31b8a
2 changed files with 9 additions and 2 deletions

View File

@@ -20,6 +20,7 @@ use slog::Drain;
use pageserver::{page_service, tui, zenith_repo_dir, PageServerConf};
const DEFAULT_GC_HORIZON: u64 = 0; //64 * 1024 * 1024;
const DEFAULT_GC_PERIOD_SEC: u32 = 1;
fn main() -> Result<()> {
let arg_matches = App::new("Zenith page server")
@@ -63,7 +64,7 @@ fn main() -> Result<()> {
daemonize: false,
interactive: false,
gc_horizon: DEFAULT_GC_HORIZON,
gc_period: Duration::from_secs(10),
gc_period: Duration::from_secs(DEFAULT_GC_PERIOD_SEC),
listen_addr: "127.0.0.1:5430".parse().unwrap(),
};

View File

@@ -80,11 +80,17 @@ pub fn wal_redo_main(conf: &PageServerConf, timelineid: ZTimelineId) {
let result = handle_apply_request(&pcache, &process, &runtime, request);
if result.is_err() {
// On error, kill the process.
// Something went wrong with handling the request. It's not clear
// if the request was faulty, and the next request would succeed
// again, or if the 'postgres' process went haywire. To be safe,
// kill the 'postgres' process so that we will start from a clean
// slate, with a new process, for the next request.
break;
}
}
// Time to kill the 'postgres' process. A new one will be launched on next
// iteration of the loop.
info!("killing WAL redo postgres process");
let _ = runtime.block_on(process.stdin.get_mut().shutdown());
let mut child = process.child;