Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some minor typos #724

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ message(STATUS "Odyssey (version: ${OD_VERSION_NUMBER}-${OD_VERSION_GIT}-${OD_VE
message(STATUS "")
message(STATUS "using compiler: ${CMAKE_C_COMPILER} version
${OD_COMPILER_VERSION}")
message(STATUS "c lang standart: ${CLANGCOMPILERSTANDART}")
message(STATUS "c lang standard: ${CLANGCOMPILERSTANDARD}")
message(STATUS " ")
message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
message(STATUS "BUILD_DEBIAN: ${BUILD_DEBIAN}")
Expand Down
2 changes: 1 addition & 1 deletion config-examples/odyssey-dev-with-watchdog.conf
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ storage "postgres_server" {
watchdog {
authentication "none"

# makes no sence
# makes no sense
storage "postgres_server"
storage_db "postgres"
storage_user "lag_usr"
Expand Down
2 changes: 1 addition & 1 deletion docker/lagpolling/lag-conf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ storage "postgres_server" {
watchdog {
authentication "none"

# makes no sence
# makes no sense
storage "postgres_server"
storage_db "postgres"
storage_user "postgres"
Expand Down
6 changes: 3 additions & 3 deletions docker/ody_integration_test/pkg/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,22 @@ func pidNyName(procName string) (int, error) {
func signalToProc(sig syscall.Signal, procName string) (*os.Process, error) {
pid, err := pidNyName(procName)
if err != nil {
err = fmt.Errorf("error due sending singal %s to process %s %w", sig.String(), procName, err)
err = fmt.Errorf("error due sending signal %s to process %s %w", sig.String(), procName, err)
fmt.Println(err)
return nil, err
}
fmt.Println(fmt.Sprintf("signalToProc: using pid %d", pid))

p, err := os.FindProcess(pid)
if err != nil {
err = fmt.Errorf("error due sending singal %s to process %s %w", sig.String(), procName, err)
err = fmt.Errorf("error due sending signal %s to process %s %w", sig.String(), procName, err)
fmt.Println(err)
return p, err
}

err = p.Signal(sig)
if err != nil {
err = fmt.Errorf("error due sending singal %s to process %s %w", sig.String(), procName, err)
err = fmt.Errorf("error due sending signal %s to process %s %w", sig.String(), procName, err)
fmt.Println(err)
return p, err
}
Expand Down
2 changes: 1 addition & 1 deletion docker/shell-test/conf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ storage "postgres_server" {
watchdog {
authentication "none"

# makes no sence
# makes no sense
storage "postgres_server"
storage_db "postgres"
storage_user "postgres"
Expand Down
2 changes: 1 addition & 1 deletion docker/shell-test/conf2.conf
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ storage "postgres_server" {
watchdog {
authentication "none"

# makes no sence
# makes no sense
storage "postgres_server"
storage_db "postgres"
storage_user "postgres"
Expand Down
4 changes: 2 additions & 2 deletions documentation/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ TCP keep-alive probes to send before giving up and killing the connection i
When the value is greater than 0, it specifies the maximum amount of time in milliseconds that transmitted data may remain unacknowledged before TCP will forcibly close the
corresponding connection.

When the value is negaive, the default system user timeout will be used.
When the value is negative, the default system user timeout will be used.

When no value or 0 is provided `1000 * (keepalive + keepalive_keep_interval * keepalive_probes) - 500` is used.

Expand Down Expand Up @@ -392,7 +392,7 @@ If specified, odyssey will bind socket with SO_REUSEPORT option.

##### graceful_die_on_errors *yes|no*

If specified, after receiving the singal SIGUSR2,
If specified, after receiving the signal SIGUSR2,
Odyssey will shutdown the socket for receptions and continue working only with old connections

#### tls *string*
Expand Down
2 changes: 1 addition & 1 deletion documentation/internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Free client context.

#### Client error codes

In the most scenarios PostgreSQL error messages `ErrorResponce` are copied to a client as-is. Yet, there are some
In the most scenarios PostgreSQL error messages `ErrorResponse` are copied to a client as-is. Yet, there are some
cases, when Odyssey has to provide its own error message and SQLCode to client.

Function `od_frontend_error()` is used for formatting and sending error message to client.
Expand Down
18 changes: 9 additions & 9 deletions odyssey.conf
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ locks_dir "/tmp/odyssey"
graceful_die_on_errors no

#
# Online restart feauture.
# Online restart feature.
# When setting to yes, restart odyssey simply with
# running new version (old one will automaticly perform graceful shutdown)
# running new version (old one will automatically perform graceful shutdown)
#
enable_online_restart no

Expand Down Expand Up @@ -177,7 +177,7 @@ log_query no
log_stats yes

#
# Statistics update inverval.
# Statistics update interval.
#
# Set interval in seconds for internal statistics update and log report.
#
Expand Down Expand Up @@ -434,8 +434,8 @@ storage "postgres_server" {
# Target session attrs feature. Odyssey will lookup for primary/standby, depending on
# value set.
# Possible values are:
# * read-write - always select host, avalible for write
# * read-only - never select host, avalible for write
# * read-write - always select host, available for write
# * read-only - never select host, available for write
# * any (the default one) - select host randomly
#
# Odyssey will traverse host and execute pg_is_in_recovery against them, to check if
Expand Down Expand Up @@ -465,7 +465,7 @@ storage "postgres_server" {
# Storage lag-polling watchdog
#
# Defines storage lag-polling watchdog options and actually enables cron-like
# watchdog for this storage. This routine will execute `watchdog_lag_query` againts
# watchdog for this storage. This routine will execute `watchdog_lag_query` against
# storage server and send return value to all routes, to decide, if connecting is desirable
# with particular lag value.

Expand All @@ -485,7 +485,7 @@ storage "postgres_server" {

log_debug no

# Watchdog will execute this query to get underlaying server lag.
# Watchdog will execute this query to get underlying server lag.
# Consider something like now() - pg_last_xact_replay_timestamp() or
# [email protected]:man-brain/repl_mon.git for production usages
watchdog_lag_query "SELECT TRUNC(EXTRACT(EPOCH FROM NOW())) - 100"
Expand All @@ -510,7 +510,7 @@ database default {
#
# Authentication certificate CN.
#
# Specify common names to check for "cert" authentification method.
# Specify common names to check for "cert" authentication method.
# If there are more then one common name is defined, all of them
# will be checked until match.
#
Expand Down Expand Up @@ -661,7 +661,7 @@ database default {
reserve_session_server_connection yes

#
# Server lifetime - maximum number of seconds for a server connetion to live. Prevents cache bloat.
# Server lifetime - maximum number of seconds for a server connection to live. Prevents cache bloat.
# Defaults to 3600 (1 hour)
#

Expand Down
2 changes: 1 addition & 1 deletion scripts/pgsql_benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fi

if [ -z "$(ls -A $PGSRC)" ]; then
START_WD=$PWD
echo "PGSRC dir is empty, aquiring PostgreSQL sources REL_11_STABLE"
echo "PGSRC dir is empty, acquiring PostgreSQL sources REL_11_STABLE"
git clone --depth=5 --single-branch --branch=REL_11_STABLE https://github.com/postgres/postgres $PGSRC
cd $PGSRC
echo "configure"
Expand Down
2 changes: 1 addition & 1 deletion scripts/pgsql_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fi

if [ -z "$(ls -A $PGSRC)" ]; then
START_WD=$PWD
echo "PGSRC dir is empty, aquiring PostgreSQL sources REL_11_STABLE"
echo "PGSRC dir is empty, acquiring PostgreSQL sources REL_11_STABLE"
git clone --depth=5 --single-branch --branch=REL_11_STABLE https://github.com/postgres/postgres $PGSRC
cd $PGSRC
echo "configure"
Expand Down
8 changes: 4 additions & 4 deletions sources/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static inline int od_auth_frontend_cleartext(od_client_t *client)
"saved user password to perform backend auth");
}

od_extention_t *extentions = client->global->extentions;
od_extension_t *extensions = client->global->extensions;

/* support mdb_iamproxy authentication */
if (client->rule->enable_mdb_iamproxy_auth) {
Expand All @@ -75,7 +75,7 @@ static inline int od_auth_frontend_cleartext(od_client_t *client)
kiwi_password_free(&client_token);
machine_msg_free(msg);
if (authentication_result != OK_RESPONSE) {
goto auth_failed; // refence at line 80, 100 and etc
goto auth_failed; // reference at line 80, 100 and etc
}
return OK_RESPONSE;
}
Expand All @@ -96,7 +96,7 @@ static inline int od_auth_frontend_cleartext(od_client_t *client)
}
#endif
if (client->rule->auth_module) {
od_module_t *modules = extentions->modules;
od_module_t *modules = extensions->modules;

/* auth callback */
od_module_t *module;
Expand Down Expand Up @@ -1055,7 +1055,7 @@ int od_auth_backend(od_server_t *server, machine_msg_t *msg,
}

od_debug(&instance->logger, "auth", NULL, server,
"recieved msg type %u", auth_type);
"received msg type %u", auth_type);

msg = NULL;

Expand Down
8 changes: 4 additions & 4 deletions sources/auth_query.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static inline int od_auth_parse_passwd_from_datarow(od_logger_t *logger,
goto success;
}

if (password_len > ODYSSEY_AUTH_QUERY_MAX_PASSSWORD_LEN) {
if (password_len > ODYSSEY_AUTH_QUERY_MAX_PASSWORD_LEN) {
goto error;
}

Expand Down Expand Up @@ -253,20 +253,20 @@ int od_auth_query(od_client_t *client, char *peer)
if (od_auth_parse_passwd_from_datarow(&instance->logger, msg,
password) == NOT_OK_RESPONSE) {
od_debug(&instance->logger, "auth_query", auth_client, server,
"auth query returned datarow in incompatable format");
"auth query returned datarow in incompatible format");
od_router_close(router, auth_client);
od_router_unroute(router, auth_client);
od_client_free(auth_client);
goto error;
}

/* save received password and recieve timestamp */
/* save received password and receive timestamp */
if (cache_value->passwd != NULL) {
/* drop previous value */
free(cache_value->passwd);

// there should be cache_value->passwd = NULL for sanity
// but this is meaninigless sinse we assing new value just below
// but this is meaninigless since we assign new value just below
}
cache_value->passwd_len = password->password_len;
cache_value->passwd = malloc(password->password_len);
Expand Down
2 changes: 1 addition & 1 deletion sources/auth_query.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Scalable PostgreSQL connection pooler.
*/

#define ODYSSEY_AUTH_QUERY_MAX_PASSSWORD_LEN 4096
#define ODYSSEY_AUTH_QUERY_MAX_PASSWORD_LEN 4096

int od_auth_query(od_client_t *, char *);

Expand Down
12 changes: 6 additions & 6 deletions sources/backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ static inline int od_storage_parse_rw_check_response(machine_msg_t *msg)
return NOT_OK_RESPONSE;
}

static inline od_retcode_t od_backend_attemp_connect_with_tsa(
static inline od_retcode_t od_backend_attempt_connect_with_tsa(
od_server_t *server, char *context, kiwi_params_t *route_params,
char *host, int port, od_tls_opts_t *opts,
od_target_session_attrs_t attrs, od_client_t *client)
Expand Down Expand Up @@ -545,14 +545,14 @@ int od_backend_connect(od_server_t *server, char *context,
switch (storage->target_session_attrs) {
case OD_TARGET_SESSION_ATTRS_RW:
for (i = 0; i < storage->endpoints_count; ++i) {
if (od_backend_attemp_connect_with_tsa(
if (od_backend_attempt_connect_with_tsa(
server, context, route_params,
storage->endpoints[i].host,
storage->endpoints[i].port,
storage->tls_opts,
OD_TARGET_SESSION_ATTRS_RW,
client) == NOT_OK_RESPONSE) {
/*backend connection not macthed by TSA */
/*backend connection not matched by TSA */
assert(server->io.io == NULL);
continue;
}
Expand All @@ -573,14 +573,14 @@ int od_backend_connect(od_server_t *server, char *context,
return NOT_OK_RESPONSE;
case OD_TARGET_SESSION_ATTRS_RO:
for (i = 0; i < storage->endpoints_count; ++i) {
if (od_backend_attemp_connect_with_tsa(
if (od_backend_attempt_connect_with_tsa(
server, context, route_params,
storage->endpoints[i].host,
storage->endpoints[i].port,
storage->tls_opts,
OD_TARGET_SESSION_ATTRS_RO,
client) == NOT_OK_RESPONSE) {
/*backend connection not macthed by TSA */
/*backend connection not matched by TSA */
assert(server->io.io == NULL);
continue;
}
Expand All @@ -600,7 +600,7 @@ int od_backend_connect(od_server_t *server, char *context,

return NOT_OK_RESPONSE;
case OD_TARGET_SESSION_ATTRS_ANY:
/* fall throught */
/* fall through */
default:;
/* use rr_counter here */
char *host = NULL; /* For UNIX socket */
Expand Down
2 changes: 1 addition & 1 deletion sources/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ void od_config_print(od_config_t *config, od_logger_t *logger)
"socket bind with: SO_REUSEPORT");
}
#ifdef USE_SCRAM
od_log(logger, "config", NULL, NULL, "SCRAM auth metod: OK");
od_log(logger, "config", NULL, NULL, "SCRAM auth method: OK");
#endif

od_log(logger, "config", NULL, NULL, "");
Expand Down
Loading