From f2e2b8a7f41090a29ae83fc6971f977953ac7db9 Mon Sep 17 00:00:00 2001 From: cui fliter Date: Tue, 25 Jul 2023 19:39:29 +0800 Subject: [PATCH] fix some typos (#4662) Typos fix Signed-off-by: cui fliter --- libs/pq_proto/src/lib.rs | 2 +- pageserver/src/disk_usage_eviction_task.rs | 4 ++-- pageserver/src/tenant/remote_timeline_client.rs | 6 +++--- .../tenant/timeline/walreceiver/connection_manager.rs | 10 +++++----- pgxn/neon/libpqwalproposer.c | 4 ++-- pgxn/neon/walproposer.c | 2 +- pgxn/neon/walproposer.h | 4 ++-- test_runner/regress/test_attach_tenant_config.py | 2 +- test_runner/regress/test_compatibility.py | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/libs/pq_proto/src/lib.rs b/libs/pq_proto/src/lib.rs index 5c5e8a9559..809fa5fffd 100644 --- a/libs/pq_proto/src/lib.rs +++ b/libs/pq_proto/src/lib.rs @@ -179,7 +179,7 @@ pub struct FeExecuteMessage { #[derive(Debug)] pub struct FeCloseMessage; -/// An error occured while parsing or serializing raw stream into Postgres +/// An error occurred while parsing or serializing raw stream into Postgres /// messages. #[derive(thiserror::Error, Debug)] pub enum ProtocolError { diff --git a/pageserver/src/disk_usage_eviction_task.rs b/pageserver/src/disk_usage_eviction_task.rs index 042d4c6d06..b729b6a643 100644 --- a/pageserver/src/disk_usage_eviction_task.rs +++ b/pageserver/src/disk_usage_eviction_task.rs @@ -545,12 +545,12 @@ async fn collect_eviction_candidates( // We could be better here, e.g., sum of all L0 layers + most recent L1 layer. // That's what's typically used by the various background loops. // - // The default can be overriden with a fixed value in the tenant conf. + // The default can be overridden with a fixed value in the tenant conf. // A default override can be put in the default tenant conf in the pageserver.toml. let min_resident_size = if let Some(s) = tenant.get_min_resident_size_override() { debug!( tenant_id=%tenant.tenant_id(), - overriden_size=s, + overridden_size=s, "using overridden min resident size for tenant" ); s diff --git a/pageserver/src/tenant/remote_timeline_client.rs b/pageserver/src/tenant/remote_timeline_client.rs index 1355356712..fee7f0c28e 100644 --- a/pageserver/src/tenant/remote_timeline_client.rs +++ b/pageserver/src/tenant/remote_timeline_client.rs @@ -514,7 +514,7 @@ impl RemoteTimelineClient { /// updated metadata. /// /// The upload will be added to the queue immediately, but it - /// won't be performed until all previosuly scheduled layer file + /// won't be performed until all previously scheduled layer file /// upload operations have completed successfully. This is to /// ensure that when the index file claims that layers X, Y and Z /// exist in remote storage, they really do. To wait for the upload @@ -625,7 +625,7 @@ impl RemoteTimelineClient { /// Note: This schedules an index file upload before the deletions. The /// deletion won't actually be performed, until any previously scheduled /// upload operations, and the index file upload, have completed - /// succesfully. + /// successfully. pub fn schedule_layer_file_deletion( self: &Arc, names: &[LayerFileName], @@ -1105,7 +1105,7 @@ impl RemoteTimelineClient { debug!("remote task {} completed successfully", task.op); } - // The task has completed succesfully. Remove it from the in-progress list. + // The task has completed successfully. Remove it from the in-progress list. { let mut upload_queue_guard = self.upload_queue.lock().unwrap(); let upload_queue = match upload_queue_guard.deref_mut() { diff --git a/pageserver/src/tenant/timeline/walreceiver/connection_manager.rs b/pageserver/src/tenant/timeline/walreceiver/connection_manager.rs index 57c09a4487..2642746c79 100644 --- a/pageserver/src/tenant/timeline/walreceiver/connection_manager.rs +++ b/pageserver/src/tenant/timeline/walreceiver/connection_manager.rs @@ -1123,7 +1123,7 @@ mod tests { } #[tokio::test] - async fn lsn_wal_over_threshhold_current_candidate() -> anyhow::Result<()> { + async fn lsn_wal_over_threshold_current_candidate() -> anyhow::Result<()> { let harness = TenantHarness::create("lsn_wal_over_threshcurrent_candidate")?; let mut state = dummy_state(&harness).await; let current_lsn = Lsn(100_000).align(); @@ -1189,8 +1189,8 @@ mod tests { } #[tokio::test] - async fn timeout_connection_threshhold_current_candidate() -> anyhow::Result<()> { - let harness = TenantHarness::create("timeout_connection_threshhold_current_candidate")?; + async fn timeout_connection_threshold_current_candidate() -> anyhow::Result<()> { + let harness = TenantHarness::create("timeout_connection_threshold_current_candidate")?; let mut state = dummy_state(&harness).await; let current_lsn = Lsn(100_000).align(); let now = Utc::now().naive_utc(); @@ -1252,8 +1252,8 @@ mod tests { } #[tokio::test] - async fn timeout_wal_over_threshhold_current_candidate() -> anyhow::Result<()> { - let harness = TenantHarness::create("timeout_wal_over_threshhold_current_candidate")?; + async fn timeout_wal_over_threshold_current_candidate() -> anyhow::Result<()> { + let harness = TenantHarness::create("timeout_wal_over_threshold_current_candidate")?; let mut state = dummy_state(&harness).await; let current_lsn = Lsn(100_000).align(); let new_lsn = Lsn(100_100).align(); diff --git a/pgxn/neon/libpqwalproposer.c b/pgxn/neon/libpqwalproposer.c index 9b6175a621..ed3b8a817f 100644 --- a/pgxn/neon/libpqwalproposer.c +++ b/pgxn/neon/libpqwalproposer.c @@ -292,7 +292,7 @@ walprop_async_read(WalProposerConn *conn, char **buf, int *amount) /* * The docs for PQgetCopyData list the return values as: 0 if the copy is * still in progress, but no "complete row" is available -1 if the copy is - * done -2 if an error occured (> 0) if it was successful; that value is + * done -2 if an error occurred (> 0) if it was successful; that value is * the amount transferred. * * The protocol we use between walproposer and safekeeper means that we @@ -353,7 +353,7 @@ walprop_async_write(WalProposerConn *conn, void const *buf, size_t size) /* * The docs for PQputcopyData list the return values as: 1 if the data was * queued, 0 if it was not queued because of full buffers, or -1 if an - * error occured + * error occurred */ result = PQputCopyData(conn->pg_conn, buf, size); diff --git a/pgxn/neon/walproposer.c b/pgxn/neon/walproposer.c index 765966092d..807fd5c91b 100644 --- a/pgxn/neon/walproposer.c +++ b/pgxn/neon/walproposer.c @@ -788,7 +788,7 @@ ReconnectSafekeepers(void) /* * Performs the logic for advancing the state machine of the specified safekeeper, - * given that a certain set of events has occured. + * given that a certain set of events has occurred. */ static void AdvancePollState(Safekeeper *sk, uint32 events) diff --git a/pgxn/neon/walproposer.h b/pgxn/neon/walproposer.h index f016a229eb..615fbf9399 100644 --- a/pgxn/neon/walproposer.h +++ b/pgxn/neon/walproposer.h @@ -23,7 +23,7 @@ * message header */ /* - * In the spirit of WL_SOCKET_READABLE and others, this corresponds to no events having occured, + * In the spirit of WL_SOCKET_READABLE and others, this corresponds to no events having occurred, * because all WL_* events are given flags equal to some (1 << i), starting from i = 0 */ #define WL_NO_EVENTS 0 @@ -317,7 +317,7 @@ typedef struct AppendResponse /* this is a criterion for walproposer --sync mode exit */ XLogRecPtr commitLsn; HotStandbyFeedback hs; - /* Feedback recieved from pageserver includes standby_status_update fields */ + /* Feedback received from pageserver includes standby_status_update fields */ /* and custom neon feedback. */ /* This part of the message is extensible. */ PageserverFeedback rf; diff --git a/test_runner/regress/test_attach_tenant_config.py b/test_runner/regress/test_attach_tenant_config.py index 4df5ae18d6..b6b46f9401 100644 --- a/test_runner/regress/test_attach_tenant_config.py +++ b/test_runner/regress/test_attach_tenant_config.py @@ -123,7 +123,7 @@ def test_config_with_unknown_keys_is_bad_request(negative_env: NegativeTests): @pytest.mark.parametrize("content_type", [None, "application/json"]) def test_empty_body(positive_env: NeonEnv, content_type: Optional[str]): """ - For backwards-compatiblity: if we send an empty body, + For backwards-compatibility: if we send an empty body, the request should be accepted and the config should be the default config. """ env = positive_env diff --git a/test_runner/regress/test_compatibility.py b/test_runner/regress/test_compatibility.py index a3d02c3f5a..6c592d3249 100644 --- a/test_runner/regress/test_compatibility.py +++ b/test_runner/regress/test_compatibility.py @@ -276,7 +276,7 @@ def prepare_snapshot( pageserver_config["listen_pg_addr"] = port_distributor.replace_with_new_port( pageserver_config["listen_pg_addr"] ) - # since storage_broker these are overriden by neon_local during pageserver + # since storage_broker these are overridden by neon_local during pageserver # start; remove both to prevent unknown options during etcd -> # storage_broker migration. TODO: remove once broker is released pageserver_config.pop("broker_endpoint", None)