Fix misc typos in comments.

This commit is contained in:
Heikki Linnakangas
2021-09-13 12:31:04 +03:00
parent 18b5165b22
commit 6afd99c73f
4 changed files with 7 additions and 6 deletions

View File

@@ -173,7 +173,7 @@ fn get_lsn_from_controlfile(path: &Path) -> Result<Lsn> {
Ok(Lsn(lsn))
}
// Create the cluster temporarily in a initdbpath directory inside the repository
// Create the cluster temporarily in 'initdbpath' directory inside the repository
// to get bootstrap data for timeline initialization.
//
fn run_initdb(conf: &'static PageServerConf, initdbpath: &Path) -> Result<()> {

View File

@@ -96,7 +96,8 @@ lazy_static! {
}
lazy_static! {
// NOTE: can be zero if pageserver was restarted an no activity happening
// NOTE: can be zero if pageserver was restarted and there hasn't been any
// activity yet.
static ref LOGICAL_TIMELINE_SIZE: IntGaugeVec = register_int_gauge_vec!(
"pageserver_logical_timeline_size",
"Logical timeline size (bytes)",

View File

@@ -429,7 +429,7 @@ pub fn save_decoded_record(
let dropdb = XlDropDatabase::decode(&mut buf);
// To drop the database, we need to drop all the relations in it. Like in
// save_xlog_dbase_create(), use the the previous record's LSN in the list_rels() call
// save_xlog_dbase_create(), use the previous record's LSN in the list_rels() call
let req_lsn = min(timeline.get_last_record_lsn(), lsn);
for tablespace_id in dropdb.tablespace_ids {

View File

@@ -34,12 +34,12 @@ lazy_static! {
}
// Records I/O stats in a "cross-platform" way.
// Compiles both on macOs and Linux, but current macOs implementation always returns 0 as values for I/O stats.
// An alternative is to read procfs (`/proc/[pid]/io`) which does not work under macOs at all, hence abandoned.
// Compiles both on macOS and Linux, but current macOS implementation always returns 0 as values for I/O stats.
// An alternative is to read procfs (`/proc/[pid]/io`) which does not work under macOS at all, hence abandoned.
//
// Uses https://www.freebsd.org/cgi/man.cgi?query=getrusage to retrieve the number of block operations
// performed by the process.
// We know the the size of the block, so we can determine the I/O bytes out of it.
// We know the size of the block, so we can determine the I/O bytes out of it.
// The value might be not 100% exact, but should be fine for Prometheus metrics in this case.
#[allow(clippy::unnecessary_cast)]
fn update_io_metrics() {