Aligning the statistics object indices to cache line size reduces the CPU
overhead of gathering the statistics. This allows the statistics to more
accurately measure the polling system without the measurement affecting
the outcome.
Now everything needed for cleanly transfer the control between the
C filter API of MaxScale and a C++ filter implementation is handled
automatically. Nothing of the earlier boiler-plate code is needed.
cache_storage_api.h contains pure C declarations, while
cache_storage_api.hh contains C++ declarations. Functions dealing
with CACHE_KEY moved to these headers.
C++ header files have the .hh-suffix to distinguish them from C
header files, but also to allow a C++ header file (e.g. xyz.hh) for
an existing C header file (e.g. xyz.h).
- cpp.hh : Basic C++ stuff. Introduces the namespace "maxscale"
and its synonym "mxs".
- filter.[hh|cc]: Template class Filter and companion class FilterSession
to be used when implementing filters in C++.
- spinlock.h : Wrapper and lock guard class for SPINLOCK.
qc_get_table_names() and qc_get_database_names() now always set
the number items, also in case of error. That is, it is now always
safe to start iterating using the number of items without first
checking the returned pointer.
Router and filter instances cannot be destroyed before all worker
threads have exited. Otherwise there is a risk that data gets deleted
while someone might still be accessing it. Further, since all router
and filter instances are created by the main-thread it is better that
they are deleted by that thread as well (and not by whichever thread
happens to execute service_shutdown()). That will reduce the risk that
some unknown assumptions are violated.
Listeners are added to the list multiple times due to how DCBs are removed
from the list. This requires that an additional check is made so that we
are sure a DCB will not be added to the list twice.
Doing batch inserts though readwritesplit would stall due to the fact that
pending session commands were stored instead of executed immediately.
Session command responses that weren't complete also discarded the partial
event instead of storing it for later use.
When a session command was received, any trailing data was lost even
though an attempt to split is was made.
With this change, each session command reply will be routed individually
and any trailing data is routed separately.
Non-replication events were implicitly ignored but this was removed in a
recent change. The code that wasn't previously used didn't break the
replication event handling loop.
Initial POC implementation that is capable of outputting the
rules of the cache.
In order to do that conveniently, the json object is retained for
the lifetime of the CACHE_RULES object.
There was no real need to have two separate functions for getting the
stored buffer and the target server. Combining them into one allows it to
be handled in a nicer way.
Events larger than 16MBytes are now encrypted when being saved.
Some changes to binlog event details report and maxbinlogcheck supports
-H option for replication header display
Statements can now be stored in the session object. This enables the
retrieval of these statements at a later time. These will be used by
readwritesplit to reroute failed reads to backup slaves.
The documentation listed the rules as a comma separated list when they
were parsed as a whitespace separated list. The match specifiers were also
defined as optional when in fact they were mandatory.
Storing the large events in memory allows checksum calculations to be done
in one step. This also makes the encryption of events easier as they
require the complete event in memory.
The backend protocol module can be requested to provide complete and
contiguous packets to the router module. This removes the need to process
the packets in binlogrouter.