23 Commits

Author SHA1 Message Date
Markus Mäkelä
18cd890474
Fix binlogrouter slave heartbeat task addition
The task was added multiple times when only one task is needed.
2019-03-28 13:21:24 +02:00
Markus Mäkelä
f8bc6b18fc
Only add tasks once in binlogrouter
Adding the same task twice isn't allowed. The API of the housekeeper tasks
might have to be changed in a way that makes it possible for the caller to
know whether a task has been added.
2019-03-26 13:44:04 +02:00
Esa Korhonen
3b55893a20 Combine maxscale/buffer.h with maxscale/buffer.hh 2019-01-17 12:37:40 +02:00
Esa Korhonen
9f721f725e MXS-2205 Convert maxscale/protocol/mysql.h to .hh 2018-12-05 11:12:20 +02:00
Markus Mäkelä
ad12ff6d06
MXS-2196: Rename dcb.h to dcb.hh 2018-12-04 11:50:43 +02:00
Esa Korhonen
756593a718 MXS-2205 Combine maxscale/router.h with maxscale/router.hh 2018-12-03 15:28:06 +02:00
Markus Mäkelä
77585bdb8c
MXS-2197: Make config.h and service.h C++ headers
This is the first step into converting the other headers into C++.
2018-11-30 12:15:57 +02:00
Markus Mäkelä
9278da1f54
MXS-2067: Remove spinlock.h
Removed the spinlock.h header and replaced with plain pthread types and
functions.
2018-09-28 12:18:24 +03:00
Johan Wikman
25038432bb MXS-2047 Rename MARIADB_GTID_INFO::file -> binlog_name
That's how the concept is named elsewhere.
2018-09-25 10:08:30 +03:00
Johan Wikman
654d3f2bbe MXS-2047 Rename BLFILE::binlogname to BLFILE::binlog_name
That's how the concept is named everywhere else.
2018-09-25 10:07:11 +03:00
Johan Wikman
cc5e3eb0ac MXS-2047 Align variable names
MARIADB_GTID_ELEMS is called gtid_elms everywhere else.
2018-09-25 10:07:11 +03:00
Johan Wikman
be4df2508f MXS-2047 Use same name for same concept
If a member variable in ROUTER_INSTANCE and ROUTER_SLAVE refer
to the same concept, the name used in both should be the same.
2018-09-25 10:07:11 +03:00
Niclas Antti
c447e5cf15 Uncrustify maxscale
See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
2018-09-09 22:26:19 +03:00
Johan Wikman
f5b73cf106 MXS-2011 Fix terminology and names
The variable storing the configuration index renamed from
'current_config' to 'config_index'.

In the code the same terminology is used as in the documentation.
"Default" is is used for referring to the default connections
(earlier "primary" was used) and the secondary connections are
referred to as "secondary" (earlier "alternative" was also used).
2018-09-04 15:54:21 +03:00
Johan Wikman
a70885a541 MXS-2011 Allow configurations to be modified
- When specifying a configuration, if it already exists use
  the existing configuration as the default, thus allowing you
  to change only a specific configuration value.
- When specifying a new alternative configuration, use the
  primary (aka first) configuration as the base.
- If MASTER_HOST is changed on the primary (first, nameless)
  configuration, then all configurations are erased.
- At "SLAVE START", always start from the first configuration.
2018-09-04 15:54:21 +03:00
Johan Wikman
812d80e403 MXS-2011 Use alternative servers
If the replication fails using the current config, we retry
immediately using another config, without waiting anything at
all.

Only when we have unsuccessfully tried with all servers, will
we wait a while before starting again.
2018-09-04 15:54:21 +03:00
Johan Wikman
ae28f8189b MXS-2011 Change return value of blr_check_connect_retry
0 cannot be used to indicate failure as 0 will be the waiting
period if we switch to an alternative server.

Also fix some minor issues; failure to initialize all members
and inverted success-check.
2018-09-04 15:54:21 +03:00
Johan Wikman
9ff0eab539 MXS-2011 First read config, then apply it
Separating the reading of the config from the process of
applying it allows us to use configs around and later apply
them (e.g. when we decide its time to switch master server).
2018-09-04 15:54:21 +03:00
Johan Wikman
dec81594c1 MXS-2011 Assert that configurations are identical
At save time, assert that the configuration as dispersed around
blr and as stored in the config object are identical.

Later its the state from the config object that will be saved.
2018-09-04 15:54:21 +03:00
Johan Wikman
0c3fcfe302 MXS-2011 Allow alternative connections to be specified
Alternative masters can now be specified like

  CHANGE MASTER TO ...
  CHANGE MASTER ":2" TO ...
  CHANGE MASTER ":3" TO ...

Now only the data is stored, but it is neither used nor
saved.
2018-09-04 15:54:21 +03:00
Johan Wikman
93dc75a011 MXS-2011 Introduce blr_file_read_master_config()
One function for writing, another for reading the config.
No code changes; just moving code around.
2018-09-04 15:54:21 +03:00
Johan Wikman
a43f2ce8fb MXS-2011 Store current CHANGE MASTER config in router 2018-09-04 15:54:21 +03:00
Johan Wikman
d036668ffa MXS-2011 Rename blr.h to blr.hh
Now contains C++ elements.
2018-09-04 15:54:21 +03:00