74 Commits

Author SHA1 Message Date
Johan Wikman
2a54224927 2.4.18 Update change date 2021-10-29 08:29:51 +03:00
Johan Wikman
a8bfbbe254 2.4.17 Update change date 2021-03-08 09:03:02 +02:00
Johan Wikman
0224f24077 2.4.16 Update Change Date 2021-02-16 14:59:00 +02:00
Johan Wikman
c5bcf7a8b1 2.4.15 Update change date 2021-01-18 15:30:30 +02:00
Johan Wikman
df36ef86d0 2.4.14 Update Change Date 2020-11-16 14:23:26 +02:00
Johan Wikman
faaf7f483e 2.4.13 Update Change Date 2020-10-14 09:15:46 +03:00
Johan Wikman
babcda3eca 2.4.12 Update Change Date 2020-08-24 09:42:48 +03:00
Johan Wikman
fc9c9fcd77 2.4.11 Update change date 2020-07-07 10:01:38 +03:00
Johan Wikman
5ebae9be90 Merge branch '2.3' into 2.4 2020-06-05 09:36:24 +03:00
Johan Wikman
aa11c960b1 2.3.20 Update change date 2020-06-05 09:31:45 +03:00
Markus Mäkelä
d3d7054639
Merge branch '2.3' into 2.4 2020-04-24 16:09:20 +03:00
Johan Wikman
f527a8f2e6 2.3.19 Update Change Date 2020-04-23 14:23:57 +03:00
Johan Wikman
d0ab797938 Merge branch '2.3' into 2.4 2020-03-12 10:33:57 +02:00
Johan Wikman
e0cd6adb26 Update change date for 2.3.18 2020-03-10 10:45:47 +02:00
Johan Wikman
8b763fb88b Merge branch '2.3' into 2.4 2020-02-12 08:27:48 +02:00
Johan Wikman
cfb3f79b54 Update 2.3.17 Change Date 2020-02-10 15:28:38 +02:00
Johan Wikman
a7e0142224 Merge branch '2.3' into 2.4 2020-01-15 11:29:37 +02:00
Johan Wikman
790d90f229 Update 2.3.16 Change Date 2020-01-15 11:08:51 +02:00
Markus Mäkelä
1092203779
Allow non-head use of gwbuf_copy_data
Non-head links in a buffer chain can now be used with gwbuf_copy_data
without triggering the debug assertion.
2019-12-31 07:26:17 +02:00
Johan Wikman
a9a2b753c0 Update 2.4.5 change date 2019-12-18 13:25:03 +02:00
Markus Mäkelä
babce13ec6
Add GWBUF pretty-printing
The gwbuf_hexdump_pretty displays the hex contents of the buffer alongside
the human-readable version of it. The text version helps identify parts of
the buffer that contain text which makes protocol data decoding easier.
2019-12-09 17:53:58 +02:00
Johan Wikman
f6731a898d Update change date 2019-11-13 08:37:17 +02:00
Johan Wikman
fdfbf3e133 Update 2.4.3 change date 2019-11-05 12:21:00 +02:00
Johan Wikman
861e27eb00 Merge branch '2.3' into 2.4 2019-10-29 14:04:31 +02:00
Johan Wikman
df6c56e7ca Update 2.3.13 Change Date 2019-10-29 12:51:31 +02:00
Johan Wikman
0ba779d5a2 Update 2.4.0 Change Date 2019-06-25 10:11:55 +03:00
Esa Korhonen
4efa9dbeea Remove maxscale/alloc.h
The remaining contents were moved to maxbase/alloc.h.
2019-06-10 14:11:25 +03:00
Johan Wikman
a6c5e880c1 MXS-2470 Validate GWBUFs
A GWBUF given to any gwbuf-function:

- Must not be NULL. Exceptions are gwbuf_free() and gwbuf_append(),
  in analogy with free() and realloc() respectively.
- Must be the head of a chain.
- Must be owned by the calling thread.
2019-05-17 14:37:38 +03:00
Johan Wikman
6cd86051de MXS-2470 Invalidate tail pointers
Although not made unambiguously clear, it is *ONLY* allowed to
manipulate GWBUFs that are the first link of a GWBUF chain (that
may consist of just one link).

With this change, in debug mode the tail pointer of intermediate
links is invalidated so that an attempt to use an intermediate
link is likely to cause a crash.
2019-05-17 14:37:38 +03:00
Johan Wikman
32c2724454 Merge branch '2.3' into develop 2019-05-14 13:36:54 +03:00
Johan Wikman
01c4beec10 MXS-2470 Update tail pointer in gwbuf_clone 2019-05-14 13:36:33 +03:00
Markus Mäkelä
6b8ca35408
Format core source files
Formatted core .cc files according to current uncrustify configuration.
2019-05-06 16:05:50 +03:00
Johan Wikman
2ba7e63e7e Merge branch '2.3' into develop 2019-03-21 09:26:06 +02:00
Markus Mäkelä
6042a53cb3
Replace raw GWBUF pointers with mxs::Buffer
Now that the query queue is stored in an actual container, it is only
logical to use mxs::Buffer instead of GWBUF as the stored type.
2019-03-18 13:18:52 +02:00
Markus Mäkelä
dd99cadfd2
Prevent unintended sharing of parsing info
When a single GWBUF was split into two with gwbuf_split, the new GWBUF
would point to the start of the shared data and the old one to the
end. Data-wise, this is fine but as the parsing info for queries is stored
in the shared buffer it causes problems when multiple packets get read in
one network payload. The end result would be that only the first query in
the lot would get parsed and the rest would get the same classification as
the first one.

To properly fix this without the need to deep clone the buffer would
require a reorganization of the buffer mechanism in MaxScale.

This commit alone doesn't fix the queued query routing problems in
readwritesplit. The commit from 2.2 which fixes the ordering problems with
queued queries is also required for a fully functional queued query
mechanism.
2019-03-18 12:17:48 +02:00
Markus Mäkelä
9a12ae53f2
Merge branch '2.3' into develop 2019-02-13 13:35:07 +02:00
Markus Mäkelä
775fc043c8
MXS-2326: Clone routing hints on gwbuf_clone
When a buffer is cloned the hints for that buffer should also be cloned.
2019-02-13 13:34:48 +02:00
Esa Korhonen
3b55893a20 Combine maxscale/buffer.h with maxscale/buffer.hh 2019-01-17 12:37:40 +02:00
Johan Wikman
c0c9a9858d MXS-2197 Rename maxscale/log.h to maxscale/log.hh
In files either include maxscale/log.hh or remove include entirelly
as maxscale/ccdefs.hh includes it.
2018-12-10 12:58:17 +02:00
Markus Mäkelä
f461ab428e
Fix backend DCB writeq throttling
The callbacks iterated over all threads when only the local ones must be
iterated. This prevents a deadlock from occurring when multiple threads
start throttling at the same time.

Also fixed the gwbuf_append debug assertion.
2018-10-20 11:53:57 +03:00
Markus Mäkelä
b33b888b07
Remove atomic operations from buffers
As buffers are meant to be used only within a particular session, the
atomic operations are no longer necessary and can thus be removed. This
removes the extra overhead that the atomic operations add.
2018-10-03 12:12:59 +03:00
Markus Mäkelä
a645467827
Clean up buffer.cc
Cleaned up the code by removing gotos and initializing variables when they
are declared. Also added some space to some functions that felt cramped.
2018-10-03 12:12:59 +03:00
Markus Mäkelä
1ed708559d
Assert that buffers are thread-local
Cross-thread usage of buffers should not happen and the debug assertions
help verify it.
2018-10-03 08:41:43 +03:00
Markus Mäkelä
304286e5fa
Remove unused code
The BUFFER_TRACE code was not in use and did not work as the HASHTABLE was
removed.
2018-10-03 08:41:42 +03: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
Markus Mäkelä
2e069fa892
MXS-1632: Take mxb::atomic::add into use
The function now mostly replaces the use of atomic_add_ functions declared
in atomic.h.
2018-09-18 15:21:54 +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
ab9a9f92cb MXS-2020 Remove maxscale/debug.h
- Removed from all files.
- maxbase/assert.h included where necessary.
2018-08-22 11:35:35 +03:00
Johan Wikman
3f53eddbde MXS-2020 Replace ss[_info]_dassert with mxb_assert[_message] 2018-08-22 11:34:59 +03:00
Johan Wikman
b1e405442f MXS-2020 Replace ss_debug with MXB_AT_DEBUG 2018-08-22 11:34:06 +03:00