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

1124 Commits

Author SHA1 Message Date
15a87ee510 Merge pull request #2257 from tntnatbry/MCOL-4957
MCOL-4957 Fix performance slowdown for processing TIMESTAMP columns.
2022-02-16 19:46:57 +02:00
973e5024d8 MCOL-4957 Fix performance slowdown for processing TIMESTAMP columns.
Part 1:
 As part of MCOL-3776 to address synchronization issue while accessing
 the fTimeZone member of the Func class, mutex locks were added to the
 accessor and mutator methods. However, this slows down processing
 of TIMESTAMP columns in PrimProc significantly as all threads across
 all concurrently running queries would serialize on the mutex. This
 is because PrimProc only has a single global object for the functor
 class (class derived from Func in utils/funcexp/functor.h) for a given
 function name. To fix this problem:

   (1) We remove the fTimeZone as a member of the Func derived classes
   (hence removing the mutexes) and instead use the fOperationType
   member of the FunctionColumn class to propagate the timezone values
   down to the individual functor processing functions such as
   FunctionColumn::getStrVal(), FunctionColumn::getIntVal(), etc.

   (2) To achieve (1), a timezone member is added to the
   execplan::CalpontSystemCatalog::ColType class.

Part 2:
 Several functors in the Funcexp code call dataconvert::gmtSecToMySQLTime()
 and dataconvert::mySQLTimeToGmtSec() functions for conversion between seconds
 since unix epoch and broken-down representation. These functions in turn call
 the C library function localtime_r() which currently has a known bug of holding
 a global lock via a call to __tz_convert. This significantly reduces performance
 in multi-threaded applications where multiple threads concurrently call
 localtime_r(). More details on the bug:
   https://sourceware.org/bugzilla/show_bug.cgi?id=16145

 This bug in localtime_r() caused processing of the Functors in PrimProc to
 slowdown significantly since a query execution causes Functors code to be
 processed in a multi-threaded manner.

 As a fix, we remove the calls to localtime_r() from gmtSecToMySQLTime()
 and mySQLTimeToGmtSec() by performing the timezone-to-offset conversion
 (done in dataconvert::timeZoneToOffset()) during the execution plan
 creation in the plugin. Note that localtime_r() is only called when the
 time_zone system variable is set to "SYSTEM".

 This fix also required changing the timezone type from a std::string to
 a long across the system.
2022-02-14 14:12:27 -05:00
cad6736d64 enum for SIMD out of ifdef 2022-02-11 18:18:23 +03:00
27dea733c5 MCOL4841 dev port run large join without OOM 2022-02-09 17:33:55 -06:00
c79dfc4925 MCOL-4809 This patch adds support for float data types filtering and scanning vectorization 2022-02-03 16:38:56 +00:00
36775168d3 MCOL-4940: getLongDoubleVal was not handling all colDataType correctly (#2229) 2022-01-31 13:46:13 -06:00
04752ec546 clang format apply 2022-01-21 16:43:49 +00:00
6b6411229f build fixes 2022-01-21 16:34:04 +00:00
01f3ceb437 replace header guards with #pragma once 2022-01-21 15:24:58 +00:00
15da99477e MDEV-27519 CRC32() upon Columnstore table returns a wrong value
Func_crc32::getIntVal(): Support the 2-ary CRC32() variant (MDEV-27208).
Also, do not assume that the string contains no NUL bytes.
2022-01-21 09:35:19 +00:00
1b6d278404 Handle error during parsing of bytestream.
The error can occur in case we send the bytestream with `old` format header.
2021-12-30 12:30:21 +03:00
af36f9940f This patch introduces support for scanning/filtering vectorized execution for numeric-based
data types TEXT, CHAR, VARCHAR, FLOAT and DOUBLE are not yet supported by vectorized path
This patch introduces an example for Google benchmarking suite to measure a perf diff
b/w legacy scan/filtering code and the templated version
2021-12-10 10:30:00 +00:00
99cad71f62 MCOL-4855 Do not log debug/info/warning messages to stderr. 2021-11-19 22:21:41 +00:00
b382f681a1 [MCOL-4849] Parallelize the processing of the bytestream vector.
This patch changes the logic of the `receiveMultiPrimitiveMessages`
function in the following way:

1. We have only one aggregation thread which reads the data from Queue (which is populated
by messages from BPPs).
2. Processing of the received `bytestream vector` could be in parallel depends on the
type of `TupleBPS` operation (join, fe2, ...) and actual thread pool workload.

The motivation is to eliminate some amount of context switches.
2021-11-04 13:28:22 +03:00
61589c60d4 Merge pull request #2124 from denis0x0D/MCOL-4810_fix
MCOL-4810 Add support for missed operation.
2021-11-01 18:21:37 +03:00
c735c9fdc9 Fix build with duplicate lz4 header 2021-10-29 13:36:15 +00:00
6393c6d019 MCOL-4810 Add support for missed operation for longStrings. 2021-10-28 10:02:02 +03:00
0324cedc88 This patch puts octet2hex symbol into a correct namespace 2021-10-25 18:08:18 +00:00
3de038c1da MCOL-4876 This patch enables continues buffer to be used by ColumnCommand and aligns BPP::blockData
that in most cases was unaligned
2021-10-06 09:23:40 +00:00
d2d2491921 Merge pull request #2065 from mariadb-AlexeyAntipovsky/MCOL-4829-dev
[MCOL-4829] Compression for the temp disk-based aggregation files
2021-09-13 23:13:53 +03:00
2556e783c6 Eliminate build race condition, messageids is generated
This ensures that building loggingcpp has messageids.h generated
beforehand, just like errorids.h .
2021-09-09 12:09:48 +03:00
6a4140394d [MCOL-4829] More accurate memory counting 2021-09-07 19:52:20 +03:00
7fea3c988e [MCOL-4829] Compression for the temp disk-based aggregation files 2021-09-02 19:30:25 +03:00
46cf13ffa8 Merge pull request #2101 from denis0x0D/MCOL-4810_2
MCOL-4810 Redundant copying and wasting memory in PrimProc
2021-08-27 14:05:51 +03:00
7bda598fbf MCOL-4810 Redundant copying and wasting memory in PrimProc
This patch eliminates a copying `long string`s into the bytestream.
2021-08-26 12:16:23 +03:00
5c5f103f98 MCOL-4839: Fix clang build (#2100)
* Fix clang build

* Extern C returned to plugin_instance

Co-authored-by: Leonid Fedorov <l.fedorov@mail.corp.ru>
2021-08-23 10:45:10 -05:00
923bbf4033 MCOL-1356: Add convert_tz (#2099) 2021-08-19 17:47:10 -05:00
517e793843 One more bool* to bool cast bug (#2097) 2021-08-18 15:56:57 -05:00
98473a45cc Merge pull request #2079 from dhall-MariaDB/MCOL-3741
Mcol 3741 Change IDB-xxxx error codes to MCS-xxxx
2021-08-18 14:01:04 -04:00
dbb1269d69 GetInterrupted returned bool instead of bool * (#2085) 2021-08-18 11:50:45 -05:00
a2f441cd9c moda returned local object pointer (#2089) 2021-08-18 11:41:07 -05:00
3136e9dbab We forgot to initilize longdoublenull value (#2091) 2021-08-18 11:34:35 -05:00
150770b919 Merge pull request #2059 from mariadb-corporation/unittests-ctest
Add ctest for google unittests
2021-08-11 11:03:05 +03:00
ecde2719b1 MCOL-3741 Change IDB-xxxx error codes to MCS-xxxx 2021-08-09 11:33:09 -05:00
4d4dd22105 MCOL-4771 develop fix crash from rand() 2021-08-06 16:09:28 -05:00
73e710ed52 Add ctest for google unittests 2021-08-02 19:41:04 +03:00
4cdef40a55 Merge pull request #2052 from drrtuy/MCOL-4815
MCOL-4815 ColumnCommand was replaced with a set of derived classes sp…
2021-07-21 17:36:35 +03:00
a292585b8c MCOL-4815 ColumnCommand was replaced with a set of derived classes specified by
column width

RTSCommand was modified to use a fabric that produces CC class based on column width

NB this patch doesn't affect PseudoCC that also leverages ColumnCommand
2021-07-21 12:54:14 +00:00
fa8dc815a7 MCOL-4814 Add a cmake build option to enable LZ4 compression.
This patch adds an option for cmake flags to enable lz4 compression.
2021-07-16 17:57:11 +03:00
3d557a2f1e Merge pull request #2044 from dhall-MariaDB/MCOL-3738
MCOL-3738 COUNT(DISTINCT) with multiple parms
2021-07-12 07:34:56 -04:00
51a8ffcb6a Fix sumavgoverflow.sql test 2021-07-09 22:41:28 +00:00
76607be63a MCOL-3738 COUNT(DISTINCT) with multiple parms
Fixed regression
Added a few more mtr tests
2021-07-09 09:07:03 -05:00
f81f743282 Replace underlying type for avg and sum for int types from long double to wide decimal 2021-07-08 17:04:43 +00:00
1113470551 MCOL-4738 AVG gives wrong results with strict_aliasing
A f fix that works with strict_aliasing
2021-07-07 13:08:32 -05:00
866dc25729 Merge pull request #1842 from denis0x0D/MCOL-987_LZ
MCOL-987 LZ4 compression support.
2021-07-07 13:13:18 +03:00
7b4f759592 Merge pull request #2032 from drrtuy/MCOL-4802
MCOL-4802 Removed ByteStream methods for bool and add some logging in…
2021-07-07 13:03:54 +03:00
8988253ff4 Merge pull request #2031 from mariadb-corporation/bar-develop-MCOL-4801
MCOL-4801 Replace Row methods getStringLength() and getStringPointer(…
2021-07-07 13:53:19 +04:00
fb5ba84212 MCOL-4802 Removed ByteStream methods for bool manipulations and add some logging into I_S.columnstore_files 2021-07-07 07:16:30 +00:00
8332ab8974 MCOL-4738 AVG() returns a wrong result
On AMD64 machines, the fpu is 80 bits. The unused bits must be masked for memcmp to work properly. For other archetectures, we don't want to mask those bits.
2021-07-06 19:50:00 -05:00
9794f24369 MCOL-4801 Replace Row methods getStringLength() and getStringPointer() to getConstString() 2021-07-06 21:15:32 +04:00