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

1162 Commits

Author SHA1 Message Date
a3c582d9fe WIP with map clean-up 2022-07-09 12:38:52 +00:00
0e8014db02 MCOL-5044 Adding EXTRA thread logic into FairThreadPool 2022-07-09 12:38:52 +00:00
6cff14997d Revert "This reverts MCOL-5044 AKA FairThreadPool that breaks regr test002"
This reverts commit 61359119ad.
2022-07-09 12:38:51 +00:00
194f0e9d64 ci: new builds grid, parallel steps 2022-07-08 22:30:02 +02:00
1624c347f6 MCOL-5152 This patch enables PP to put ByteStreams into DEC input queue directly for a local PP-EM connection 2022-07-04 09:06:40 +00:00
d451b5c7c5 fix 2022-06-24 18:06:04 +08:00
4c0b8fd829 simd of arm neon
unit testing

pass unit test for simdprocessor

add test cases

implement specific _mm_movemask for different types

float movemask change

rename
2022-06-24 11:24:59 +08:00
9a24934728 MCOL-4841 remove BOOST_BIND_GLOBAL_PLACEHOLDERS
drone has this defined on the command line
2022-06-14 16:16:38 -05:00
6d47529499 Merge branch 'develop' into MCOL-4841 2022-06-14 14:41:41 -05:00
d4cf894edc MCOL-4841 fix some compiler issues 2022-06-14 14:32:01 -05:00
272246e9fa Merge branch 'develop' into MCOL-4841 2022-06-09 16:58:33 -05:00
e40c16bd56 Merge pull request #2404 from drrtuy/MCOL-5044-dev
MCOL-5044 FairThreadPool implementation
2022-06-09 22:23:52 +03:00
3b6449842f Merge branch 'develop' into MCOL-4841
# Conflicts:
#	exemgr/main.cpp
#	oam/etc/Columnstore.xml.singleserver
#	primitives/primproc/primproc.cpp
2022-06-09 10:07:26 -05:00
7c9da5709d MCOL-5105 This patch raises pipe read operation timeout to 20 minutes
to enable DMLProc to survive rollbacks on startup.
The patch also fixes linter warnings in service.h and pipe.h.
2022-06-09 14:34:50 +00:00
2d2a6223f5 MCOL-5044 This patch introduces current active jobs estimate counter and replaces some attributes with atomics 2022-06-08 16:58:50 +00:00
c7e67aedd9 Renamed variables + removed server tests 2022-06-03 15:30:25 +03:00
66c69c7609 Welford's algorithm STD and VAR on window functions 2022-06-03 15:29:30 +03:00
c5fa27475d Welford algorithm for STD and VAR
Naive algorithm for calculating STD and VAR is subject to catastrophic
cancellation. A well-known Welford's algorithms is used instead.
2022-06-03 15:29:30 +03:00
4e50fca460 Merge pull request #2401 from denis0x0D/statistic_man
StatisticsManager initialize all plugins.
2022-06-03 15:41:28 +05:30
fd8ba33f21 MCOL-5044 This patch replaces PriorityThreadPool with FairThreadPool that uses a simple
operations + morsel size weight model to equally allocate CPU b/w parallel query morsels.
This patch delivers better parallel query timings distribution(timings graph resembles normal
distribution with a bigger left side thus more queries runs faster comparing with PrioThreadPool-based
single-node installation).
See changes in batchprimitiveprocessor-jl.h and comments in fair_threadpool.h for
important implementation details
2022-06-03 10:08:12 +00:00
c92dc08264 MCOL-5044 Initial version of a fair thread pool
PP now uses PriorityThreadPool that arbitrary picks another jobs pack
    to run. This scheduling discipline tend to run portions of a single query
    forcing other simultaneous queries to wait. In result parallel queries
    timings variance is high. The FairThreadPool picks the job with the smallest
    amount of work done so far(see the code for details)
2022-06-02 17:05:12 +00:00
6c0ebd568b StatisticsManager initialize all plugins.
This patch adds support for initializing all plugins in the system.
2022-05-31 12:42:00 +03:00
0dab97da7d Actual fix for percentile window function
We fix 'partial out-of-bounds reference' warning uncovered when building
with gcc11.
2022-05-19 15:48:23 +03:00
4c26e4f960 MCOL-4912 This patch introduces Extent Map index to improve EM scaleability
EM scaleability project has two parts: phase1 and phase2.
        This is phase1 that brings EM index to speed up(from O(n) down
        to the speed of boost::unordered_map) EM lookups looking for
        <dbroot, oid, partition> tuple to turn it into LBID,
        e.g. most bulk insertion meta info operations.
        The basis is boost::shared_managed_object where EMIndex is
        stored. Whilst it is not debug-friendly it allows to put a
        nested structs into shmem. EMIndex has 3 tiers. Top down description:
        vector of dbroots, map of oids to partition vectors, partition
        vectors that have EM indices.
        Separate EM methods now queries index before they do EM run.
        EMIndex has a separate shmem file with the fixed id
        MCS-shm-00060001.
2022-05-04 12:59:16 +00:00
fb3eaabd29 Merge pull request #2338 from mariadb-corporation/external-boost
Use external boost 1.78
2022-05-04 13:25:22 +02:00
c25ae4f378 Use external boost 1.78 2022-05-02 18:23:37 +00:00
bbb168a846 Mcol 4560 (#2337)
* MCOL-4560 remove unused xml entries and code that references it.
There is reader code and variables for some of these settings, but nobody uses them.
2022-04-18 18:00:17 -04:00
5820a21e19 Merge pull request #2331 from drrtuy/MCOL-5001-pp-em-combo-merge-1
Mcol 5001 pp em combo merge 1
2022-04-13 15:16:18 +03:00
e174696351 MCOL-5001 This patch merges ExeMgr and PrimProc runtimes
EM and PP are most resource-hungry runtimes.
        The merge enables to control their cummulative
        resource consumption, thread allocation + enables
        zero-copy data exchange b/w local EM and PP facilities.
2022-04-04 11:46:33 +00:00
7cdc914b4e MCOL-4809 This patch introduces vectorized scanning/filtering for short CHAR/VARCHAR columns
Short CHAR/VARCHAR column values contain integer-encoded strings.
    After certain manipulations(orderSwap(strnxfrm(str))) the values
    become integers that preserve original strings order relation
    according to a certain translation rules(collation). Prepared
    values are ready to be SIMD-processed.
2022-04-01 10:28:33 +00:00
65252df4f6 C++20 fixes 2022-03-28 12:32:29 +00:00
fbd043b036 Fixing alightment for clang tests of rowgroup 2022-03-23 14:29:19 +00:00
ba0306e5ce Fix build with Server 10.7 and newer. Its kinda hack, but works, can be reverted, when server fix thier code 2022-03-16 15:43:02 +00:00
a98834e31c MCOL-4841 Fix for MCOL-5009
respondWait could be set to false
while other threads were waiting. With respondWait false, okToRrespond
wouldn't ever get notify_one(). Get rid of respondWait and use
fProcessorPool->blockedThreadCount to determine if any threads may be
waiting.
2022-03-07 15:25:00 -06:00
53b9a2a0f9 MCOL-4580 extent elimination for dictionary-based text/varchar types
The idea is relatively simple - encode prefixes of collated strings as
integers and use them to compute extents' ranges. Then we can eliminate
extents with strings.

The actual patch does have all the code there but miss one important
step: we do not keep collation index, we keep charset index. Because of
this, some of the tests in the bugfix suite fail and thus main
functionality is turned off.

The reason of this patch to be put into PR at all is that it contains
changes that made CHAR/VARCHAR columns unsigned. This change is needed in
vectorization work.
2022-03-02 23:53:39 +03:00
c6c36eb622 MCOL-5002 dev use largeRG when indexing by largeKeyColumns[] 2022-03-01 08:44:39 -06:00
5a577553f7 Hex double convertion 2022-02-24 10:07:22 +03:00
3919c541ac New warnfixes (#2254)
* Fix clang warnings

* Remove vim tab guides

* initialize variables

* 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length

* Fix ISO C++17 does not allow 'register' storage class specifier for outdated bison

* chars are unsigned on ARM, having  if (ival < 0) always false

* chars are unsigned by default on ARM and comparison with -1 if always true
2022-02-17 13:08:58 +03:00
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