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

67 Commits

Author SHA1 Message Date
baae1f66a5 * fix(compilation): New warn AKA 3919c541 backport
* fix(compilation): `New warn` AKA 3919c541 backport

* chore: Bump version to 6.4.8-2
2024-04-24 14:33:13 +03:00
4b51820db1 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-05-27 12:37:21 +00:00
7ebd0d3b3c MCOL-5009 fix deadlock
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 14:24:54 -06:00
7c808317dc clang format apply 2022-02-11 12:24:40 +00:00
509f005be7 Mcol 4841 dev6 Handle large joins without OOM (#2155)
* MCOL-4846 dev-6 Handle large join results
Use a loop to shrink the number of results reported per message to something manageable.

* MCOL-4841 small changes requested by review

* Add EXTRA threads to prioritythreadpool
prioritythreadpool is configured at startup with a fixed number of threads available. This is to prevent thread thrashing. Since most of the time, BPP job steps are short lived, and a rescheduling mechanism exist if no threads are available, this works to keep cpu wastage to a minimum.

However, if a query or queries consume all the threads in prioritythreadpool and then block (due to the consumer not consuming fast enough) we can run out of threads and no work will be done until some threads unblock. A new mechanism allows for EXTRA threads to be generated for the duration of the blocking action. These threads can act on new queries. When all blocking is completed, these threads will be released when idle.

* MCOL-4841 dev6 Reconcile with changes in develop-6

* MCOL-4841 Some format corrections

* MCOL-4841 dev clean up some things based on review

* MCOL-4841 dev 6 ExeMgr Crashes after large join
This commit fixes up memory accounting issues in ExeMgr

* MCOL-4841 remove LDI change
Opened MCOL-4968 to address the issue

* MCOL-4841 Add fMaxBPPSendQueue to ResourceManager
This causes the setting to be loaded at run time (requires restart to accept a change) BPPSendthread gets this in it's ctor
Also rolled back changes to TupleHashJoinStep::smallRunnerFcn() that used a local variable to count locally allocated memory, then added it into the global counter at function's end. Not counting the memory globally caused conversion to UM only join way later than it should. This resulted in MCOL-4971.

* MCOL-4841 make blockedThreads and extraThreads atomic
Also restore previous scope of locks in bppsendthread. There is some small chance the new scope could be incorrect, and the performance boost is negligible. Better safe than sorry.
2022-02-09 21:38:32 +03:00
4a8e7bf2fc [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 08:10:37 +03:00
afa88866bb MCOL-4483: Fix and consolidate log files and cpimport logging. 2021-02-12 15:40:16 -06:00
6f9cc0a067 MCOL-4486 Removing deadlock implicitly introduced by the deprecated class boost::condition 2021-02-04 15:39:02 +00:00
ab44ef6ddb MCOL-4170 Refactor services/systemd units to finish their bootstrap ... 2020-11-09 12:01:16 +04:00
1c74f80d76 MCOL-4136 This patch makes an explicit dependency on generated errorids.h 2020-08-05 12:22:50 +00:00
eac7dab096 MCOL-4030: first commit of warning removals unneed const and missing virtual dtors. 2020-06-23 13:51:36 -05:00
91196607bd Merge pull request #1204 from mariadb-corporation/MCOL-3836_take2
MCOL-3991 Merge 3 MCS packages in one, MCOL-3923 Refactor MCS packaging rules take 1.
2020-05-15 17:39:35 -05:00
98abf95eae MCOL-3991 MCS is now single package and properly uninstalls 2020-05-12 13:36:24 +00:00
0d82ad70a7 MCOL-3986 Explicit cast for logging::Message::Args::add calls. 2020-05-11 15:27:14 +03:00
586391e1ca compilation failure
error: reference to 'mutex' is ambiguous
note: candidates are: 'class boost::mutex'
note:                 'class std::mutex'
2019-12-19 18:13:39 +01:00
49994f7bc3 Fix warnings found in DEBUG combined build
Fixes:
* Irrelevant where conditions
* Irrelevant const
* A potential infinite loop in treenode
* Bad implicit case fallthroughs
* Explicit markings for required case fallthroughs
* Unused variables
* Unused function

Also disabled some warnings for now which we should fix later.
2019-12-10 16:33:08 +00:00
7489d0bfd0 MCOL-3625 Rename packages
Rename packages to MariaDB-columnstore-engine, MariaDB-columnstore-libs
and MariaDB-columnstore-platform.

Also add the "columnstore-" prefix the the components so that MariaDB's
packaging system understands then and add a line to include them in
MariaDB's packaging.

In addition
* Fix S3 building for dist source build
* Fix Debian 10 dependency issue
* Fix git handling for dist builds
* Add support for MariaDB's RPM building
* Use MariaDB's PCRE and readline
* Removes a few dead files
* Fix Boost noncopyable includes
2019-12-04 11:04:39 +00:00
0d26dc447c Squash merge of the threaded UM hash table construction feature.
Conflicts:
	oam/etc/Columnstore.xml.singleserver
2019-11-21 14:41:00 -05:00
ebb22a96a3 MCOL-3551 Use generic MariaDB Server paths
This branch enforces the use of generic MariaDB server paths for their
binaries and data rather than custom paths.

/usr/local/mariadb/columnstore is now only for columnstore with this
patch.

It should be noted that this removes the auto-mounting of external
MariaDB UM data storage for AWS.

This is also a fix for MCOL-3510 after buildbot changes are made.

Also... MCOL-3552 Use columnstore.cnf to load plugins

The ColumnStore plugins now load using a columnstore.cnf instead of a
SQL sequence to be more in-line with MariaDB's methods.
2019-10-13 09:34:37 +01:00
3fef0f21d3 Remove vpj files
They shouldn't be here
2019-09-05 17:38:03 +01:00
811909aa72 Merge branch 'develop-1.2' into develop-merge-up-20190729 2019-07-29 12:19:26 +01:00
e12a2acd53 MCOL-537 Regression test doesn't tolerate 'failed' in stderr, stdout.
I reformulate the messages.

    Changed version in preprocessor conditions to avoid compilation
    warnings in Debian 9.

    Disabled sign-compare check for generated files in DML/DDL.
2019-05-20 18:30:52 +03:00
ea2ff9cd11 Merge branch 'develop-1.1' into develop-1.2-merge-up-20190517 2019-05-17 20:43:49 +01:00
020b211bb7 Merge branch 'develop-1.2' into develop-merge-up-20190514 2019-05-14 13:58:33 +01:00
f2d8a33ee5 MCOL-3296 CTRL+C should not double remove from dequeue. 2019-05-09 12:42:18 -05:00
3c89a4bba4 MCOL-537 Preprocessor if blocks with pragmas now have else branch.
DMLProc exits on setupCwd failure.
2019-05-09 20:25:21 +03:00
b2436502cb MCOL-537 Enabled -Wno-unused-result for OAM code.
Fixed pragmas that disables compilation checks.

    DDLProc now returns an error if it couldn't cwd.

    Use either auto_ptr or unique_ptr depending on GCC version.
2019-05-08 19:44:01 +03:00
9dc33c4e82 Another try to cope with warnings under gcc 8.2. 2019-04-29 11:05:03 +03:00
cbbf267e88 MCOL-537, cleanup compiler warnings. Checkpointing a bunch of fixes.
Work in progress...
2019-04-29 10:56:48 +03:00
4b9d046c6e Fully resolve potentially ambiguous symbols by removing using namespace statements from headers which have a cascading effect. This causes potential behavior changes when switching to c++11 since symbols can be exported from std and boost while both have been imported into the global namespace. 2019-04-29 01:21:15 -05:00
35ab11cbb6 remove std::auto_ptr 2019-04-26 04:46:46 -05:00
e65f80f493 delete visual c++ project files. cmake can generate these if needed 2019-04-25 23:35:03 -05:00
ccd9a414eb MCOL-1810 Fix hang on low core count
Anything that links against joblist will spin up a threadpool upon
startup. This includes the tools setConfig/getConfig. It is possible on
a low core count machine or low CPU speed that the signal to the prune
thread to shutdown is sent before the thread has completed startup when
these quick-running tools are used.

This fix adds a mutex so that spin up and shutdown can't happen at the
same time as well as a stop watch in case we are shutting down when
either the thread is running or we haven't fully started.
2018-10-16 18:03:25 +01:00
de19208ea9 MCOL-1810 Fix hang on low core count
Anything that links against joblist will spin up a threadpool upon
startup. This includes the tools setConfig/getConfig. It is possible on
a low core count machine or low CPU speed that the signal to the prune
thread to shutdown is sent before the thread has completed startup when
these quick-running tools are used.

This fix adds a mutex so that spin up and shutdown can't happen at the
same time as well as a stop watch in case we are shutting down when
either the thread is running or we haven't fully started.
2018-10-16 17:55:41 +01:00
f1f13a09d1 Merge branch 'develop-1.1' into 1.1-merge-up-2018-10-05 2018-10-05 18:40:07 +01:00
5092b4fd13 MCOL-1750 unique_ptr doesn't work in all OSes 2018-09-28 07:55:06 +01:00
94dfacfe25 MCOL-1750 Fix threadpool stack leaks
When a thread has been idle for 10 minutes and we have too many threads
in the threadpool the thread will be pruned. This is done by the
thread's main function just returning. Unfortunately this does not free
up the memory, the thread either needs to be joined or detatched.

We cannot use detached threads since there are mutexes and conditional
variables between the main thread and the threadpool threads. If the
main thread finishes before the threadpool threads (as would happen in
cpimport) then crashes occur. The parent needs to wait on the child
threads which is the whole point in joining.

So this fix spawns a new thread which every minute will check the list
of threads to be joined due to timeout and join them.

We have had to use an adapted version of boost::thread_group so that we
can join a single thread based off its thread ID.

In addition with have modified PriorityThreadPool to use detached
threads since this does not need to signal the child threads at the end.
2018-09-28 07:21:49 +01:00
8c90419852 Fix merge and coding style issues 2018-06-22 15:31:31 +01:00
7ca289ded9 Merge branch 'develop-1.1' into 1.1-merge-up-20180621 2018-06-22 14:51:20 +01:00
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
250d90a9bc MCOL-1474 Catch errors in PriorityThreadPool
PriorityThreadPool errors cause crashes in PrimProc. This patch catches
the errors and causes the thread to end cleanly.
2018-06-14 14:43:37 +01:00
5b1f5d5fe4 MCOL-1412 Ubuntu 18.04 support
Backport Ubuntu 18.04 support to 1.1
2018-05-14 22:03:25 +01:00
b83c21d891 MCOL-1376 Fix compiler errors in Ubuntu 18.04
Ubuntu 18.04 uses GCC 7.3 which is a little stricter than before.

Fixes a few errors due to implicit includes that are no longer implicit
and a ton of warnings about the implied alignment of code in
utils/common/any.hpp
2018-05-02 09:40:27 +01:00
0d7c0f7ae4 Merge branch 'develop-1.1' into dev-merge-up-20180202 2018-02-02 14:53:36 +00:00
9749d825b5 MCOL-1165 use the threadpool's idle down feature 2018-01-16 13:26:44 -06:00
504fcf0778 MCOL-1128 Allow exeMgrThreadPool to use unlimited threads. The number will be limited by the number of sessions allowed in server. 2018-01-12 16:29:01 -06:00
01446d1e22 Reformat all code to coding standard 2017-10-26 17:18:17 +01:00
3330495a2e MCOL-777 Cleanup source
Clean out autotools and some other things from the source tree.
2017-08-07 15:59:56 +01:00
88a372c671 MCOL-513 Use vector ref for join to prevent vector copy. 2017-02-20 11:45:29 -06:00
def06be564 MCOL-513 Use vector ref for join to prevent vector copy. 2017-02-20 11:43:46 -06:00