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

Some minor fixes #292

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion galera/src/replicator_smm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ apply_trx_ws(void* recv_ctx,
{
using galera::TrxHandle;
static const size_t max_apply_attempts(4);
const char *ordinals[] = {"st", "nd", "rd", "th"};
size_t attempts(1);

do
Expand Down Expand Up @@ -76,7 +77,10 @@ apply_trx_ws(void* recv_ctx,
if (attempts <= max_apply_attempts)
{
log_warn << e.what()
<< "\nRetrying " << attempts << "th time";
<< "\nRetrying "
<< attempts
<< ordinals[(attempts < 4) ? attempts - 1 : 3]
<< " time";
}
}
else
Expand Down
9 changes: 5 additions & 4 deletions gcomm/src/gmcast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,12 +576,13 @@ void gcomm::GMCast::handle_established(Proto* est)
log_warn << self_string()
<< " address '" << est->remote_addr()
<< "' points to own listening address, blacklisting";

addr_blacklist_.insert(make_pair(est->remote_addr(),
AddrEntry(gu::datetime::Date::now(),
gu::datetime::Date::now(),
est->remote_uuid())));
}
pending_addrs_.erase(i);
addr_blacklist_.insert(make_pair(est->remote_addr(),
AddrEntry(gu::datetime::Date::now(),
gu::datetime::Date::now(),
est->remote_uuid())));
}
erase_proto(proto_map_->find_checked(est->socket()->id()));
update_addresses();
Expand Down
2 changes: 1 addition & 1 deletion gcs/src/gcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2113,7 +2113,7 @@ _set_recv_q_hard_limit (gcs_conn_t* conn, const char* value)

if (limit > LONG_MAX) limit = LONG_MAX;

long long limit_fixed = limit * gcs_fc_hard_limit_fix;
long long limit_fixed = limit * GCS_FC_HARD_LIMIT_FIX;

if (conn->params.recv_q_hard_limit == limit_fixed) return 0;

Expand Down
2 changes: 0 additions & 2 deletions gcs/src/gcs_fc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
#include <galerautils.h>
#include <string.h>

double const gcs_fc_hard_limit_fix = 0.9; //! allow for some overhead

static double const min_sleep = 0.001; //! minimum sleep period (s)

/*! Initializes operational constants before opening connection to group
Expand Down
5 changes: 4 additions & 1 deletion gcs/src/gcs_params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const char* const GCS_PARAMS_RECV_Q_HARD_LIMIT = "gcs.recv_q_hard_limit";
const char* const GCS_PARAMS_RECV_Q_SOFT_LIMIT = "gcs.recv_q_soft_limit";
const char* const GCS_PARAMS_MAX_THROTTLE = "gcs.max_throttle";

const double GCS_FC_HARD_LIMIT_FIX = 0.9; //! allow for some overhead

static const char* const GCS_PARAMS_FC_FACTOR_DEFAULT = "1.0";
static const char* const GCS_PARAMS_FC_LIMIT_DEFAULT = "16";
static const char* const GCS_PARAMS_FC_MASTER_SLAVE_DEFAULT = "no";
Expand Down Expand Up @@ -200,7 +202,8 @@ gcs_params_init (struct gcs_params* params, gu_config_t* config)
int64_t tmp;
if ((ret = params_init_int64 (config, GCS_PARAMS_RECV_Q_HARD_LIMIT, 0, 0,
&tmp))) return ret;
params->recv_q_hard_limit = tmp * 0.9; // allow for some meta overhead
// Allow for some meta overhead
params->recv_q_hard_limit = tmp * GCS_FC_HARD_LIMIT_FIX;

if ((ret = params_init_bool (config, GCS_PARAMS_FC_MASTER_SLAVE,
&params->fc_master_slave))) return ret;
Expand Down
2 changes: 2 additions & 0 deletions gcs/src/gcs_params.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ extern const char* const GCS_PARAMS_RECV_Q_HARD_LIMIT;
extern const char* const GCS_PARAMS_RECV_Q_SOFT_LIMIT;
extern const char* const GCS_PARAMS_MAX_THROTTLE;

extern const double GCS_FC_HARD_LIMIT_FIX;

/*! Register configuration parameters */
extern bool
gcs_params_register(gu_config_t* config);
Expand Down