1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-05 16:15:50 +03:00
Commit Graph

332 Commits

Author SHA1 Message Date
Patrick LeBlanc
de9dc56f21 MCOL-1847. Made the field parsing a little more paranoid. 2018-11-20 13:00:36 -06:00
Patrick LeBlanc
9363504dd4 MCOL-1847. Addressed feedback from Daniel.
Instead of a seperate param for cache size, we decided
to allow an override of the NumBlocksPct param instead.
If NumBlocksPct ends in an 'm' or a 'g', it will be interpreted
as megabytes or gigabytes instead of a %age.
2018-11-20 12:49:32 -06:00
Patrick LeBlanc
a4f4580f03 Fixed a typo.
Somehow deleted a '}' right before the last commit.  :P
2018-11-19 14:37:39 -06:00
Patrick LeBlanc
39e784abd2 MCOL-1847. Added a config param for PM cache size.
New param is 'NumBlocksInMB', which will be the size
of the block cache in MB.
2018-11-19 14:32:14 -06:00
david hill
101b36acb6 Merge branch 'develop' into MCOL-520 2018-10-08 14:23:48 -05:00
Andrew Hutchings
3fffc75d86 Fix brace merge issue 2018-10-05 21:48:51 +01:00
Andrew Hutchings
f1f13a09d1 Merge branch 'develop-1.1' into 1.1-merge-up-2018-10-05 2018-10-05 18:40:07 +01:00
David Hill
4e6e5647ef MCOL-520 2018-09-21 10:40:05 -05:00
Andrew Hutchings
24c5e93756 MCOL-1737 Add debug logging options for LRU cache
This adds options which are user enabled to debug the LRU cache inside
ColumnStore. Specifically cache flushing.

It adds the following:
* PrimProc flush information when SIGUSR2 mode is enabled
* cpimport dictionary flush information when -d2 is used
* WriteEngineServer DML flush information to STDERR
2018-09-21 09:50:10 +01:00
Andrew Hutchings
03da6df473 Merge branch 'develop-1.1' into 1.1-merge-up-20180817 2018-08-17 16:17:13 +01:00
Andrew Hutchings
4f6949835d MCOL-1037 Fix race condition in FIFO buffer
The FIFO buffer could get data in next() whilst a data swap is happening
due to a rare race condition. This patch adds mutexes around the parts
that could race.

The observed effect of this race was during a complex aggregate query
the results would occasionally be incorrect.

In addition this fixes a race condition in PrimProc's regex processor.
2018-07-11 15:32:27 +01:00
Andrew Hutchings
9e3f92b6a3 MCOL-1330 Make debug flag let valgrind work
Add a '-d' flag to WriteEngine, ExeMgr and PrimProc to let valgrind work
with them.
2018-06-25 15:10:28 +01:00
Andrew Hutchings
8c90419852 Fix merge and coding style issues 2018-06-22 15:31:31 +01:00
Andrew Hutchings
7ca289ded9 Merge branch 'develop-1.1' into 1.1-merge-up-20180621 2018-06-22 14:51:20 +01:00
Andrew Hutchings
40405c792a MCOL-1474 Add error handling to PTP
PriorityThreadPool didn't have very good error handling. If something
failed it would just ignore whatever was being processed. This could
lead to a query continuing without retreiving all of the required data.

This patch adds error handling, sending a message back to the client
and a log message. It also destroys and recreates the pool thread.
2018-06-14 16:28:06 +01:00
David Hall
ea70806e93 MCOL-1201 Add support for UDAF multiple parm constants 2018-06-05 14:10:04 -05:00
Andrew Hutchings
3c1ebd8b94 MCOL-392 Add initial TIME datatype support 2018-04-30 09:42:41 +01:00
Andrew Hutchings
280dcb44bf Merge branch 'develop-1.1' into dev-merge-up-20180409 2018-04-09 19:15:18 +01:00
Andrew Hutchings
44c7693d48 MCOL-1246 Fix typo in boost call 2018-03-09 15:21:53 +00:00
Andrew Hutchings
fa3574b6b1 MCOL-1246 Make matching SQL-92 compliant(ish)
SQL-92 basically specifies for a NOPAD collation that only space should
be ignored for matches. Tabs and other whitespace are handled
differently. We don't fully support collations yet so we assume the
defaults.
2018-03-09 13:08:09 +00:00
Andrew Hutchings
905ce2ce8b MCOL-1246 Fix for non-DSS step
For TEXT columns (and some other scenarios) we don't do a DSS step to
scan dictionaries and do it directly in the BPS step instead. This patch
applies the previous fix to this case too.
2018-03-09 11:14:33 +00:00
Andrew Hutchings
17e954db7d MCOL-1246 Fix string matching for whitespace
For equality string matches other engines ignore trailing whitespace
(this does not apply to LIKE matches). So we should do the same. This
patch trims whitespace for MIN/MAX extent elimination checks, fixed
width columns and dictionary columns during equality matches against
constants (SELECT * FROM t1 WHERE b = 'ABC').
2018-03-07 16:56:42 +00:00
Andrew Hutchings
0d7c0f7ae4 Merge branch 'develop-1.1' into dev-merge-up-20180202 2018-02-02 14:53:36 +00:00
Andrew Hutchings
5d9f9c819b Merge branch 'develop-1.0' into 1.1-merge-up-20180118 2018-01-18 16:28:08 +00:00
Andrew Hutchings
c31c836352 MCOL-1085 Add crash dump to daemons
This patch adds an automated crash dump which logs in
/var/log/mariadb/columnstore/trace/ when one of the ColumnStore daemons
crashes.
2018-01-03 09:20:09 +00:00
Andrew Hutchings
01446d1e22 Reformat all code to coding standard 2017-10-26 17:18:17 +01:00
Andrew Hutchings
401e257df3 MCOL-879 Fix QueryStats linking issues
With 1.1 we have removed libdrizzle and used MariaDB's client library
instead for both CrossEngine and QueryStats. Unfortunately MariaDB 10.2
has two client libraries which have different structs with the same
name. When QueryStats was running inside the ColumnStore plugin this
symbol conflict was causing a crash.

The server's built-in client API has several different and several
missing functions so some additions to sm.cpp were made to fill the
gaps.

This patch does the following:

* Make sure that libmariadb is only linked to executables, not the
ColumnStore Plugin (to avoid symbol conflicts). Note that all
executables that link to CrossEngine and/or QueryStats need to link to
libmariadb to avoid missing symbol issues.
* Use the server's built-in client API for QueryStats when run in the
plugin
* Replace missing server built-in client API calls in sm.cpp (this is
for QueryStats and CrossEngine to keep the dynamic linker happy)
* Fixes issue where using 'localhost' as the MariaDB Server hostname
would fail in QueryStats.
2017-08-18 10:16:52 +01:00
Andrew Hutchings
05d934f0ab MCOL-744 Fix BPP mutex crash
Whilst very rare we can hit a case where we attempt to unlock objLock
when it is already unlocked. With the Boost version in Ubuntu 16.04 this
triggers an abort() effectively crashing PrimProc.

In this patch we switch to a pthread mutex instead which does not have
this limitation. At a later date we can look into refactoring how BPP
and this mutex works.
2017-08-11 07:21:37 +01:00
Andrew Hutchings
fa17a98d60 MCOL-744 Fix BPP mutex crash
Whilst very rare we can hit a case where we attempt to unlock objLock
when it is already unlocked. With the Boost version in Ubuntu 16.04 this
triggers an abort() effectively crashing PrimProc.

In this patch we switch to a pthread mutex instead which does not have
this limitation. At a later date we can look into refactoring how BPP
and this mutex works.
2017-08-11 07:17:07 +01:00
Andrew Hutchings
3330495a2e MCOL-777 Cleanup source
Clean out autotools and some other things from the source tree.
2017-08-07 15:59:56 +01:00
David.Hall
f2e7feffd6 Merge pull request #224 from mariadb-corporation/MCOL-857-1.1
MCOL-857 Fix thread leak on ByteStream exception
2017-08-03 12:40:14 -05:00
Andrew Hutchings
d690a14eb9 MCOL-857 Fix thread leak on ByteStream exception
ByteStream::advance can throw an exception if there isn't enough data in
the buffer yet. PrimProc's BPP processor would not catch this causing a
thread to be leaked every time. This was happening on BPP destroy and
abort.
2017-08-03 17:49:55 +01:00
Andrew Hutchings
3d3142e29a MCOL-857 Fix thread leak on ByteStream exception
ByteStream::advance can throw an exception if there isn't enough data in
the buffer yet. PrimProc's BPP processor would not catch this causing a
thread to be leaked every time. This was happening on BPP destroy and
abort.
2017-08-03 17:47:56 +01:00
David Hall
e49edf19c8 MCOL-523 set copyright notices 2017-08-03 11:36:19 -05:00
David Hall
108fbcf572 MCOL-523 Add UDAF and UDAnF SDK 2017-08-02 11:30:57 -05:00
David Hall
bc2a4e7795 MCOL-523 Add UDAF and UDAnF SDK 2017-08-02 11:22:07 -05:00
Andrew Hutchings
be7b83f89a MCOL-834 Fix crashes introduced
* Fix race condition in cleanup
* Fix mutex cleanup crash
2017-07-27 23:24:30 +01:00
Andrew Hutchings
bc80fd99dc MCOL-834 Fix crashes introduced
* Fix race condition in cleanup
* Fix mutex cleanup crash
2017-07-27 23:22:45 +01:00
Andrew Hutchings
29ac5fe2b2 MCOL-834 Cleanup BPP threads on ExeMgr disconnect
If ExeMgr disconnects (such as a crash) whilst queries are being
executed some BPP threads get orphaned. This patch tracks the BPP usage
for each threads and cleans up appropriately.
2017-07-26 14:16:25 +01:00
Andrew Hutchings
b990a26996 MCOL-834 Cleanup BPP threads on ExeMgr disconnect
If ExeMgr disconnects (such as a crash) whilst queries are being
executed some BPP threads get orphaned. This patch tracks the BPP usage
for each threads and cleans up appropriately.
2017-07-26 11:50:26 +01:00
dhall-InfiniDB
f240c89faf Merge pull request #156 from mariadb-corporation/MCOL-671
MCOL-671 Fix TEXT/BLOB single row SELECT WHERE
2017-04-21 10:06:34 -05:00
Andrew Hutchings
6128293ad3 MCOL-671 Fix TEXT/BLOB single row SELECT WHERE
pDictionaryScan won't work for BLOB/TEXT since it requires searching the
data file and rebuilding the token from matches. The tokens can't be
rebuild correctly due the bits in the token used for block counts. This
patch forces the use of pDictionaryStep instead for WHERE conditions.

In addition this patch adds support for TEXT/BLOB in various parts of
the job step processing. This fixes things like error 202 during an
UPDATE with a join condition on TEXT/BLOB columns.
2017-04-21 11:21:59 +01:00
Andrew Hutchings
785e6c91bd MCOL-670 Fix UPDATE with BLOB/TEXT
* Don't cache > 8000 bytes during update
* Fix PrimProc case where token is used more than once
2017-04-19 22:45:23 +01:00
Andrew Hutchings
e9db44424c MCOL-642 Separate TEXT from BLOB
* TEXT and BLOB now have separate identifiers internally
* TEXT columns are identified as such in system catalog
* cpimport only requires hex input for BLOB, not TEXT
2017-03-27 21:36:27 +01:00
Andrew Hutchings
530cc94915 MCOL-267 Minor fixups
Fix things found by David Hall
2017-03-23 17:14:00 +00:00
Andrew Hutchings
b1d04c04fb MCOL-267 Fix LONGBLOB issues
* Set max column length to a little under 2.1GB in DDL
* Fix token edge case
* Re-write RowGroup string handling to take more than 64KB in one string
2017-03-21 17:22:31 +00:00
Andrew Hutchings
1892ac8681 MCOL-267 Bulk write & PrimProc fixes 2017-03-20 21:26:53 +00:00
Andrew Hutchings
093aa377e5 MCOL-267 multi-block support for PrimProc and bulk
* Adds multi-block bulk write support
* Adds PrimProc multi-block read support
* Allows the functions length() and hex() to work with BLOB columns
2017-03-20 18:32:24 +00:00
Andrew Hutchings
aea729fe7d MCOL-267 DML support
* DML writes for multi-block dictionary (blob) now works
* PrimProc fixed so that the first block in multi-block is read
correctly
* Performance optimisation (removed string copy into stack) for new
dictionary entries
2017-03-18 14:31:29 +00:00
Andrew Hutchings
80b4d7ee36 MCOL-553 Improve error handling for ulimit
Now sends an error to the error log and aborts postConfigure
2017-02-21 21:10:57 +00:00