From fbbd0f36ebab69e83bed46ccb8cc53bf2a9f6a27 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 15 Dec 2025 16:16:16 +0000 Subject: [PATCH] Fix grammatical errors in code comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit corrects 20 grammatical errors found in comments throughout the codebase: - Fix spelling mistakes: "bellow" → "below", "diagnostig" → "diagnostic", "hastable" → "hashtable", "uless" → "unless", "cludge" → "kludge", "des not" → "does not", "unsucessful" → "unsuccessful", "alrady" → "already", "nod" → "node" - Fix subject-verb agreement: "exist" → "exists" - Fix verb tense: "received" → "receive" - Fix redundant words: "node node" → "node" - Fix double spacing: "subscription name" → "subscription name" - Fix project name reference: "BDR slot" → "spock slot" - Improve error message phrasing for clarity --- src/spock_conflict.c | 6 +++--- src/spock_dependency.c | 2 +- src/spock_failover_slots.c | 2 +- src/spock_functions.c | 2 +- src/spock_group.c | 2 +- src/spock_manager.c | 2 +- src/spock_node.c | 4 ++-- src/spock_output_plugin.c | 2 +- src/spock_relcache.c | 2 +- src/spock_repset.c | 2 +- src/spock_rpc.c | 2 +- src/spock_sync.c | 14 +++++++------- src/spock_worker.c | 2 +- 13 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/spock_conflict.c b/src/spock_conflict.c index 05204c60..5591b378 100644 --- a/src/spock_conflict.c +++ b/src/spock_conflict.c @@ -78,7 +78,7 @@ conflict_resolve_by_timestamp(RepOriginId local_origin_id, cmp = timestamptz_cmp_internal(remote_ts, local_ts); /* - * The logic bellow assumes last update wins, we invert the logic by + * The logic below assumes last update wins, we invert the logic by * inverting result of timestamp comparison if first update wins was * requested. */ @@ -134,14 +134,14 @@ conflict_resolve_by_timestamp(RepOriginId local_origin_id, if (loc_node->tiebreaker < rmt_node->tiebreaker) { - /* TODO: Need diagnostig logging for ACE here */ + /* TODO: Need diagnostic logging for ACE here */ elog(LOG, "CONFLICT: current node=%d wins over %d by tiebreaker", loc_node->id, rmt_node->id); *resolution = SpockResolution_KeepLocal; return false; } else { - /* TODO: Need diagnostig logging for ACE here */ + /* TODO: Need diagnostic logging for ACE here */ elog(LOG, "CONFLICT: remote node=%d wins over %d by tiebreaker", rmt_node->id, loc_node->id); *resolution = SpockResolution_ApplyRemote; return true; diff --git a/src/spock_dependency.c b/src/spock_dependency.c index 3c4ae709..f2462a17 100644 --- a/src/spock_dependency.c +++ b/src/spock_dependency.c @@ -695,7 +695,7 @@ reportDependentObjects(const ObjectAddresses *targetObjects, int my_log_min_messages; /* - * This is cludge for Windows (Postgres des not define the GUC variables + * This is kludge for Windows (Postgres does not define the GUC variables * as PGDDLIMPORT) */ my_client_min_messages = atoi(GetConfigOptionByName("client_min_messages", diff --git a/src/spock_failover_slots.c b/src/spock_failover_slots.c index 3dc12300..21aa21df 100644 --- a/src/spock_failover_slots.c +++ b/src/spock_failover_slots.c @@ -523,7 +523,7 @@ wait_for_primary_slot_catchup(ReplicationSlot *slot, RemoteSlot *remote_slot) /* * Append the dbname of the remote slot. We don't use a generic db like - * postgres here because plugin callback bellow might want to invoke + * postgres here because plugin callback below might want to invoke * extension functions. */ make_sync_failover_slots_dsn(&connstr, remote_slot->database); diff --git a/src/spock_functions.c b/src/spock_functions.c index a2d70dec..33a73644 100644 --- a/src/spock_functions.c +++ b/src/spock_functions.c @@ -430,7 +430,7 @@ spock_alter_node_drop_interface(PG_FUNCTION_ARGS) if (oldif == NULL) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("interface \"%s\" for node node \"%s\" not found", + errmsg("interface \"%s\" for node \"%s\" not found", if_name, node_name))); other_subs = get_node_subscriptions(node->id, true); diff --git a/src/spock_group.c b/src/spock_group.c index 596c33b8..41ae2fc0 100644 --- a/src/spock_group.c +++ b/src/spock_group.c @@ -86,7 +86,7 @@ spock_group_shmem_request(void) #endif /* - * This is cludge for Windows (Postgres does not define the GUC variable + * This is kludge for Windows (Postgres does not define the GUC variable * as PGDDLIMPORT) */ napply_groups = atoi(GetConfigOptionByName("max_worker_processes", NULL, diff --git a/src/spock_manager.c b/src/spock_manager.c index 463daec3..a344cb2c 100644 --- a/src/spock_manager.c +++ b/src/spock_manager.c @@ -93,7 +93,7 @@ manage_apply_workers(void) if (!wlc) apply = NULL; - /* Skip if the worker was alrady registered. */ + /* Skip if the worker was already registered. */ if (spock_worker_running(apply)) continue; diff --git a/src/spock_node.c b/src/spock_node.c index 3b78a937..285960c5 100644 --- a/src/spock_node.c +++ b/src/spock_node.c @@ -121,7 +121,7 @@ validate_subscription_name(const char *name) if (strlen(name) == 0) ereport(ERROR, (errcode(ERRCODE_INVALID_NAME), - errmsg("subscription name \"%s\" is too short", name))); + errmsg("subscription name \"%s\" is too short", name))); if (strlen(name) >= NAMEDATALEN) ereport(ERROR, @@ -748,7 +748,7 @@ get_node_interface_by_name(Oid nodeid, const char *name, bool missing_ok) return NULL; } else - elog(ERROR, "node interface \"%s\" not found for nod %u", + elog(ERROR, "node interface \"%s\" not found for node %u", name, nodeid); } diff --git a/src/spock_output_plugin.c b/src/spock_output_plugin.c index 5ce0b01f..c4de774d 100644 --- a/src/spock_output_plugin.c +++ b/src/spock_output_plugin.c @@ -1363,7 +1363,7 @@ spock_output_plugin_shmem_request(void) prev_shmem_request_hook(); /* - * This is cludge for Windows (Postgres des not define the GUC variable as + * This is kludge for Windows (Postgres does not define the GUC variable as * PGDDLIMPORT) */ nworkers = atoi(GetConfigOptionByName("max_worker_processes", NULL, diff --git a/src/spock_relcache.c b/src/spock_relcache.c index 08185e21..70542c3d 100644 --- a/src/spock_relcache.c +++ b/src/spock_relcache.c @@ -294,7 +294,7 @@ spock_relcache_invalidate_callback(Datum arg, Oid reloid) hash_seq_init(&status, SpockRelationHash); - /* TODO, use inverse lookup hastable */ + /* TODO, use inverse lookup hashtable */ while ((entry = (SpockRelation *) hash_seq_search(&status)) != NULL) { if (entry->reloid == reloid) diff --git a/src/spock_repset.c b/src/spock_repset.c index a3e76d5c..e717ee82 100644 --- a/src/spock_repset.c +++ b/src/spock_repset.c @@ -1408,7 +1408,7 @@ replication_set_remove_seq(Oid setid, Oid seqoid, bool from_drop) tuple = systable_getnext(scan); /* - * Remove the tuple if found, if not found report error uless this + * Remove the tuple if found, if not found report error unless this * function was called as result of table drop. */ if (HeapTupleIsValid(tuple)) diff --git a/src/spock_rpc.c b/src/spock_rpc.c index 91fc8198..0189211c 100644 --- a/src/spock_rpc.c +++ b/src/spock_rpc.c @@ -270,7 +270,7 @@ spock_drop_remote_slot(PGconn *conn, const char *slot_name) return; } - /* Slot found, validate that it's BDR slot */ + /* Slot found, validate that it's spock slot */ if (PQgetisnull(res, 0, 0)) elog(ERROR, "Unexpectedly null field %s", PQfname(res, 0)); diff --git a/src/spock_sync.c b/src/spock_sync.c index 44fe680b..40f04235 100644 --- a/src/spock_sync.c +++ b/src/spock_sync.c @@ -305,14 +305,14 @@ restore_structure(SpockSubscription *sub, const char *srcfile, cmdargv[cmdargc++] = NULL; /* - * TODO: misleading error message takes place here if an error is - * interrupted execution. + * TODO: misleading error message can occur if an error interrupts + * execution. */ if (exec_cmd(pg_restore, cmdargv) != 0) ereport(ERROR, (errcode_for_file_access(), errmsg("could not execute pg_restore (\"%s\"): %m", pg_restore), - errhint("explore error log to realise the origin of the issue"))); + errhint("check the error log to determine the cause of the issue"))); } /* @@ -351,8 +351,8 @@ ensure_replication_slot_snapshot(PGconn *sql_conn, PGconn *repl_conn, const char *sqlstate = PQresultErrorField(res, PG_DIAG_SQLSTATE); /* - * If our slot already exist but is not used, it's leftover from - * previous unsucessful attempt to synchronize table, try dropping it + * If our slot already exists but is not used, it's leftover from + * previous unsuccessful attempt to synchronize table, try dropping it * and recreating. */ if (sqlstate && @@ -467,7 +467,7 @@ adjust_progress_info(PGconn *origin_conn, PGconn *target_conn) sap.remote_insert_lsn = str_to_lsn(remote_insert_lsn); /* - * We don't actually received a single WAL record - just assume + * We don't actually receive a single WAL record - just assume * we've got the last commit only. Don't set it to the Invalid * value in case someone uses tracking data in state monitoring * scripts. @@ -575,7 +575,7 @@ start_copy_target_tx(PGconn *conn, const char *origin_name) /* * Set correct origin if target db supports it. We must do this before - * starting the transaction otherwise the status code bellow would get + * starting the transaction otherwise the status code below would get * much more complicated. */ if (PQserverVersion(conn) >= 90500) diff --git a/src/spock_worker.c b/src/spock_worker.c index 8a4a4fe2..032e8314 100644 --- a/src/spock_worker.c +++ b/src/spock_worker.c @@ -804,7 +804,7 @@ spock_worker_shmem_request(void) prev_shmem_request_hook(); /* - * This is cludge for Windows (Postgres des not define the GUC variable as + * This is kludge for Windows (Postgres does not define the GUC variable as * PGDDLIMPORT) */ nworkers = atoi(GetConfigOptionByName("max_worker_processes", NULL,