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

Spelling routing #362

Open
wants to merge 24 commits into
base: develop
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
2 changes: 1 addition & 1 deletion server/modules/routing/avrorouter/avro/maxavro.cc
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ char* maxavro_read_string_from_file(MAXAVRO_FILE* file, size_t* size)
}

/**
* @bref Skip an Avro string
* @brief Skip an Avro string
*
* @param file Avro file handle
* @return True if the string was skipped, false if an error occurred.
Expand Down
2 changes: 1 addition & 1 deletion server/modules/routing/avrorouter/avro/maxavro_record.cc
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ bool maxavro_record_seek(MAXAVRO_FILE* file, uint64_t offset)
/**
* @brief seek to file offset
*
* This sets the file offset to a position and checks that it is preceeded by a
* This sets the file offset to a position and checks that it is preceded by a
* valid sync marker.
*
* @param file File to seek
Expand Down
2 changes: 1 addition & 1 deletion server/modules/routing/avrorouter/avrorouter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

static const char* avro_client_states[] = {"Unregistered", "Registered", "Processing", "Errored"};
static const char* avro_client_client_mode[] = {"Catch-up", "Busy", "Wait_for_data"};
static const char* avro_client_ouput[] = {"Undefined", "JSON", "Avro"};
static const char* avro_client_output[] = {"Undefined", "JSON", "Avro"};

/** How a binlog file is closed */
typedef enum avro_binlog_end
Expand Down
2 changes: 1 addition & 1 deletion server/modules/routing/pinloki/config.hh
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ private:
maxbase::Duration m_heartbeat_interval = maxbase::Duration(300s);

/**
* Master connection retry timout. Default 60s.
* Master connection retry timeout. Default 60s.
*/
maxbase::Duration m_connect_retry_tmo = 60s;

Expand Down
2 changes: 1 addition & 1 deletion server/modules/routing/pinloki/file_transformer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace pinloki
class Config;

/**
* @brief FileTransformer runs autonomously in it's own thread. The few public functions
* @brief FileTransformer runs autonomously in its own thread. The few public functions
* are only accessible via wrapper functions in the Config class. It provides:
* - An always up to date list of existing binlog files in creation order.
* This list is also written to a file called "binlog.index" for some obscure
Expand Down
2 changes: 1 addition & 1 deletion server/modules/routing/pinloki/file_writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace
/** The next file name has the same base name as the file from the master, but
* the counter portion is generated here. By using the master base_name the
* event length stays the same, which means the 'next_pos' in the events do
* not have to be modifed.
* not have to be modified.
*/
std::string next_file_name(const std::string& master, const std::string& prev)
{
Expand Down
2 changes: 1 addition & 1 deletion server/modules/routing/pinloki/ifstream_reader.hh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public:
/**
* @brief put_back Only one putback can be in effect at any one time.
* The next read must match the size of what was put
* back. `advance()` can not be called when put back is
* back. `advance()` cannot be called when put back is
* in effect.
*
* Events are read in two parts, first the header
Expand Down
4 changes: 2 additions & 2 deletions server/modules/routing/pinloki/parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ DECLARE_ATTR_RULE(sq_str, "string", std::string);
DECLARE_ATTR_RULE(dq_str, "single-quoted string", std::string);
DECLARE_ATTR_RULE(q_str, "quoted string", std::string);
DECLARE_ATTR_RULE(func, "function", std::string);
DECLARE_ATTR_RULE(field, "intentifier, function, string or number", Field);
DECLARE_ATTR_RULE(field, "identifier, function, string or number", Field);
DECLARE_ATTR_RULE(select_field, "field definition", SelectField);
DECLARE_ATTR_RULE(master_gtid_wait, "MASTER_GTID_WAIT", MasterGtidWait);
DECLARE_ATTR_RULE(variable, "key-value", Variable);
Expand Down Expand Up @@ -310,7 +310,7 @@ const auto command_def =
const auto set_statement_def = x3::lit("SET") > x3::lit("STATEMENT")
> x3::omit[variable % ','] > x3::lit("FOR") > command;

// The complete grammar, case insensitive
// The complete grammar, case-insensitive
const auto grammar_def = x3::no_case[
command
| set_statement] > end_of_input;
Expand Down
4 changes: 2 additions & 2 deletions server/modules/routing/pinloki/reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Reader::Reader(SendCallback cb, WorkerCallback worker_cb,

void Reader::start()
{
/* Reader-as-a-seprate process. This and the other spot with
/* Reader-as-a-separate process. This and the other spot with
* a comment "Reader-as-a-separate process", should be configurable
* to use find_last_gtid_list() instead of config().rpl_state()
* in order for the Readers to run without a Writer. Some other
Expand Down Expand Up @@ -107,7 +107,7 @@ bool Reader::poll_start_reading()
// This version waits for ever.
// Is there reason to timeout and send an error message?

/* Reader-as-a-seprate process. See comment in Reader::start() */
/* Reader-as-a-separate process. See comment in Reader::start() */
bool continue_poll = true;
auto gtid_list = m_inventory.config().rpl_state();
if (gtid_list.is_included(maxsql::GtidList({m_start_gtid_list})))
Expand Down
4 changes: 2 additions & 2 deletions server/modules/routing/pinloki/rpl_event.cc
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ Rotate RplEvent::rotate() const
{
Rotate rot;
rot.is_fake = m_timestamp == 0;
rot.is_artifical = m_flags & LOG_EVENT_ARTIFICIAL_F;
rot.is_artificial = m_flags & LOG_EVENT_ARTIFICIAL_F;
rot.file_name = get_rotate_name(pBuffer(), buffer_size());

return rot;
Expand Down Expand Up @@ -285,7 +285,7 @@ std::string RplEvent::query_event_sql() const

std::ostream& operator<<(std::ostream& os, const Rotate& rot)
{
os << rot.file_name << " is_ariticial=" << rot.is_artifical << " is_fake=" << rot.is_fake;
os << rot.file_name << " is_artificial=" << rot.is_artificial << " is_fake=" << rot.is_fake;
return os;
}

Expand Down
4 changes: 2 additions & 2 deletions server/modules/routing/pinloki/rpl_event.hh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct FormatDescription
struct Rotate
{
bool is_fake;
bool is_artifical;
bool is_artificial;
std::string file_name;
};

Expand Down Expand Up @@ -159,7 +159,7 @@ public:
unsigned short flags() const;

/**
* @brief read_body - completes the event when only yhe header was read.
* @brief read_body - completes the event when only the header was read.
* No effect if the body has already been read.
* @param file - file to read from
* @param *file_pos - file position to start reading from, and set
Expand Down
2 changes: 1 addition & 1 deletion server/modules/routing/readconnroute/readconnroute.cc
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ bool RCRSession::routeQuery(GWBUF&& buffer)
stats.inc_total();
if ((m_bitvalue & (SERVER_MASTER | SERVER_SLAVE)) == SERVER_MASTER)
{
// not necessarily a write, but explicitely routed to a master
// not necessarily a write, but explicitly routed to a master
stats.inc_write();
}
else
Expand Down
8 changes: 4 additions & 4 deletions server/modules/routing/readwritesplit/rwsplit_causal_reads.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void RWSplitSession::discard_master_wait_gtid_result(GWBUF& buffer)
}

/**
* @bref After discarded the wait result, we need correct the seqence number of every packet
* @brief After discarded the wait result, we need correct the seqence number of every packet
*
* @param buffer origin reply buffer
*
Expand Down Expand Up @@ -191,14 +191,14 @@ bool RWSplitSession::continue_causal_read()
}

/**
* Add a wait gitd query in front of user's query to achive causal read
* Add a wait gitd query in front of user's query to achieve causal read
*
* @param origin The reply buffer
*/
GWBUF RWSplitSession::add_prefix_wait_gtid(const GWBUF& origin)
{
/**
* Pack wait function and client query into a multistatments will save a round trip latency,
* Pack wait function and client query into a multistatement will save a round trip latency,
* and prevent the client query being executed on timeout.
* For example:
* SET @maxscale_secret_variable=(SELECT CASE WHEN MASTER_GTID_WAIT('232-1-1', 10) = 0
Expand Down Expand Up @@ -283,7 +283,7 @@ GWBUF RWSplitSession::reset_gtid_probe()
get_sql_string(m_current_query.buffer).c_str());
mxb_assert_message(!m_query_queue.empty(), "Query queue should contain at least one query");

// Retry the the original query that triggered the GTID probe.
// Retry the original query that triggered the GTID probe.
auto buffer = std::move(m_query_queue.front());
m_query_queue.pop_front();

Expand Down
4 changes: 2 additions & 2 deletions server/modules/routing/readwritesplit/rwsplitsession.cc
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ void RWSplitSession::handle_error(mxs::ErrorType type, const std::string& messag
handle_slave_error(backend->name(), expected_response);
}

// Decrement the expected response count only if we know we can continue the sesssion.
// Decrement the expected response count only if we know we can continue the session.
// This keeps the internal logic sound even if another query is routed before the session
// is closed.
if (expected_response)
Expand Down Expand Up @@ -945,7 +945,7 @@ void RWSplitSession::endpointConnReleased(mxs::Endpoint* down)
}

/**
* Handle failed slave serers
* Handle failed slave servers
*/
void RWSplitSession::handle_slave_error(const char* name, bool expected_response)
{
Expand Down
2 changes: 1 addition & 1 deletion server/modules/routing/replicator/rpl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1978,7 +1978,7 @@ bool Rpl::handle_table_map_event(REP_HEADER* hdr, uint8_t* ptr)
* @param router Avro router instance
* @param hdr Replication header
* @param ptr Pointer to the start of the event
* @return True on succcess, false on error
* @return True on success, false on error
*/
bool Rpl::handle_row_event(REP_HEADER* hdr, uint8_t* ptr)
{
Expand Down
6 changes: 3 additions & 3 deletions server/modules/routing/schemarouter/schemaroutersession.cc
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ std::pair<bool, std::string> extract_database(const Parser& parser, const GWBUF&

if (tokens.size() < 2 || strcasecmp(tokens[0].c_str(), "use") != 0)
{
MXB_INFO("extract_database: Malformed chage database packet.");
MXB_INFO("extract_database: Malformed change database packet.");
ok = false;
}
else
Expand Down Expand Up @@ -727,7 +727,7 @@ void SchemaRouterSession::handle_default_db()
if (!rval)
{
/** Unknown database, hang up on the client*/
MXB_INFO("Connecting to a non-existent database '%s'", m_connect_db.c_str());
MXB_INFO("Connecting to a nonexistent database '%s'", m_connect_db.c_str());
char errmsg[128 + MYSQL_DATABASE_MAXLEN + 1];
sprintf(errmsg, "Unknown database '%s'", m_connect_db.c_str());
if (m_config.debug)
Expand Down Expand Up @@ -877,7 +877,7 @@ int SchemaRouterSession::inspect_mapping_states(SRBackend* b, const mxs::Reply&
* @param buf Buffer containing the database change query
* @param cmd The command being executed
*
* @return True if new database was set and a query was executed, false if non-existent database was tried
* @return True if new database was set and a query was executed, false if nonexistent database was tried
* to be used and it wasn't found on any of the backends.
*/
bool SchemaRouterSession::change_current_db(const GWBUF& buf, uint8_t cmd)
Expand Down
4 changes: 2 additions & 2 deletions server/modules/routing/smartrouter/mysql_plus.hh
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class ComResponse : public ComPacket
public:
enum class Type {Ok, Err, Eof, LocalInfile, Data};

// The client has to specificy when it is expecting a packet without a cmd byte. See the meaning
// The client has to specify when it is expecting a packet without a cmd byte. See the meaning
// of different Types in member functions below.
ComResponse(const ComPacket& packet, bool expecting_data_only)
: ComPacket(packet)
Expand Down Expand Up @@ -435,7 +435,7 @@ public:
<< "\nOrg table : " << m_org_table
<< "\nName : " << m_name
<< "\nOrd name : " << m_org_name
<< "\nCharacer set : " << m_character_set
<< "\nCharacter set: " << m_character_set
<< "\nColumn length: " << m_column_length
<< "\nType : " << (uint16_t)m_type
<< "\nFlags : " << m_flags
Expand Down
2 changes: 1 addition & 1 deletion server/modules/routing/smartrouter/perf_info.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <unordered_map>

/** PerformanceInfo is a class that on the one hand provides routeQuery() with performance/routing
* information and on the other has data for class SmartRouter to manage the life-time of a measurment.
* information and on the other has data for class SmartRouter to manage the life-time of a measurement.
*/
class PerformanceInfo
{
Expand Down
2 changes: 1 addition & 1 deletion server/modules/routing/smartrouter/smartsession.hh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SmartRouter;
* Although the assumption is one RowServer and one ColumnServer, the code does not assume that,
* it simply forces you to state which Cluster is the master.
* Currently SmartRouter fails if any Cluster fails. That need not be the case, Clusters could
* be marked "is_critical" meaning non-crititcal non-masters, could be allowed to fail.
* be marked "is_critical" meaning non-critical non-masters, could be allowed to fail.
*/

class SmartRouterSession : public mxs::RouterSession, private mariadb::QueryClassifier::Handler
Expand Down