1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00
Commit Graph

71 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
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
c20015a7b2 MCOL-4713 Analyze table implementation. 2021-07-02 12:37:12 +03:00
475104e4d3 [MCOL-4709] Disk-based aggregation
* Introduce multigeneration aggregation

* Do not save unused part of RGDatas to disk
* Add IO error explanation (strerror)

* Reduce memory usage while aggregating
* introduce in-memory generations to better memory utilization

* Try to limit the qty of buckets at a low limit

* Refactor disk aggregation a bit
* pass calculated hash into RowAggregation
* try to keep some RGData with free space in memory

* do not dump more than half of rowgroups to disk if generations are
  allowed, instead start a new generation
* for each thread shift the first processed bucket at each iteration,
  so the generations start more evenly

* Unify temp data location

* Explicitly create temp subdirectories
  whether disk aggregation/join are enabled or not
2021-06-06 16:09:15 +03:00
9608533d92 MCOL-4734 Compilation failure: MariaDB-10.6 + ColumnStore-develop
mcsconfig.h and my_config.h have the following
pre-processor definitions:

1. Conflicting definitions coming from the standard cmake definitions:
- PACKAGE
- PACKAGE_BUGREPORT
- PACKAGE_NAME
- PACKAGE_STRING
- PACKAGE_TARNAME
- PACKAGE_VERSION
- VERSION

2. Conflicting definitions of other kinds:
- HAVE_STRTOLL - this is a dirt in MariaDB headers.
  Should be fixed in the server code. my_config.h erroneously
  performs "#define HAVE_STRTOLL" instead of "#define HAVE_STRTOLL 1".
  in some cases. The former is not CMake compatible style. The latter is.

3. Non-conflicting definitions:
  Otherwise, mcsconfig.h and my_config.h should be mutually compatible,
  because both are generated by cmake on the same host machine. So
  they should have exactly equal definitions like "HAVE_XXX", "SIZEOF_XXX", etc.

Observations:
- It's OK to include both mcsconfig.h and my_config.h providing that we
  suppress duplicate definition of the above conflicting types #1 and #2.
- There is no a need to suppress duplicate definitions mentioned in #3,
  as they are compatible!
- my_sys.h and m_ctype.h must always follow a CMake configuation header,
  either my_config.h or mcsconfig.h (or both).
  They must never be included without any preceeding configuration header.

This change make sure that we resolve conflicts by:
- either disallowing inclusion of mcsconfig.h and my_config.h
  at the same time
- or by hiding conflicting definitions #1 and #2
  (with their later restoring).
- also, by making sure that my_sys.h and m_ctype.h always follow
  a CMake configuration file.

Details:
- idb_mysql.h can now only be included only after my_config.h
  An attempt to use idb_mysql.h with mcsconfig.h instead of
  my_config.h is caught by the "#error" preprocessor directive.

- mariadb_my_sys.h can now be only included after mcsconfig.h.
  An attempt to use mariadb_my_sys.h without mcscofig.h
  (e.g. with my_config.h) is also caught by "#error".

- collation.h now can now be included in two ways.
  It now has the following effective structure:

    #if defined(PREFER_MY_CONFIG_H) && defined(MY_CONFIG_H)
    //  Remember current conflicting definitions on the preprocessor stack
    //  Undefine current conflicting definitions
    #endif
    #include "mcsconfig.h"
    #include "m_ctype.h"
    #if defined(PREFER_MY_CONFIG_H) && defined(MY_CONFIG_H)
    #    Restore conflicting definitions from the preprocessor stack
    #endif

  and can be included as follows:

  a. using only mcsconfig.h as a configuration header:

    // my_config.h must not be included so far
    #include "collation.h"

  b. using my_config.h as the first included configuration file:

    #define PREFER_MY_CONFIG_H // Force conflict resolution
    #include "my_config.h"     // can be included directly or indirectly
    ...
    #include "collation.h"

Other changes:

- Adding helper header files
     utils/common/mcsconfig_conflicting_defs_remember.h
     utils/common/mcsconfig_conflicting_defs_restore.h
     utils/common/mcsconfig_conflicting_defs_undef.h
  to perform conflict resolution easier.

- Removing `#include "collation.h"` from a number of files,
  as it's automatically included from rowgroup.h.

- Removing redundant `#include "utils_utf8.h"`.
  This change is not directly related to the problem being fixed,
  but it's nice to remove redundant directives for both collation.h
  and utils_utf8.h from all the files that do not really need them.
  (this change could probably have gone as a separate commit)

- Changing my_init() to MY_INIT(argv[0]) in the MCS services sources.
  After the fix of the complitation failure it appeared that ColumnStore
  services compiled with the debug build crash due to recent changes in
  safemalloc. The crash happened in strcmp() with `my_progname` as an argument
  (where my_progname is a mysys global variable). This problem should
  probably be fixed on the server side as well to avoid passing NULL.
  But, the majority of MariaDB executable programs also use MY_INIT(argv[0])
  rather than my_init(). So let's make MCS do like the other programs do.
2021-05-25 12:34:36 +04:00
a6a85d157d MCOL-4666 Empty set when using BIT OR and BIT AND functions in WHERE 2021-04-07 14:37:39 +04:00
846f7fb29b MCOL-4193: Delete unused OAM and applications, ProcMon, ProcMgr, and no longer build all tools for packages 2021-02-08 17:51:09 -06:00
2ea73846b9 MCOL-4422 Remove mariadb.h and my_sys.h dependency from collation.h 2020-11-30 14:26:35 +04:00
ab44ef6ddb MCOL-4170 Refactor services/systemd units to finish their bootstrap ... 2020-11-09 12:01:16 +04:00
f9078efbc6 MCOL-3536 Collation 2020-06-08 17:57:37 -05:00
a43de9d536 Merge branch 'develop' into MCOL-3536 2020-05-28 14:20:32 -05:00
2e66b1f1e8 MCOL-3536 Collation 2020-05-28 14:19:17 -05:00
2fa17c3b9a Merge pull request #1220 from drrtuy/exemgr-pp-connections
MCOL-4015 ExeMgr now re-establishes its connections with PrimProcs.
2020-05-27 09:19:01 -05:00
13414513e5 MCOL-4015 ExeMgr now re-establishes its connections with PrimProcs. 2020-05-27 12:45:15 +00:00
ee4589ef40 MCOL-4018 Disable legacy OAM by default. 2020-05-27 08:32:03 +00:00
06e50e0926 MCOL-3536 collation 2020-05-26 12:42:11 -05:00
1f3d1e6fd6 MCOL-3536 collation 2020-05-14 16:02:49 -05:00
5ff131e726 Merge pull request #1004 from pleblanc1976/runtime-disable-oam
Runtime disable oam
2020-02-28 13:54:39 -05:00
207fb3f588 Merge pull request #960 from LinuxJedi/unified_build
Unified build for ES and MCS
2019-12-05 01:19:23 +01:00
7b67636c38 MCOL-3645 - Make ExeMgr destroy joblists in a different thread
Fixed a compiler warning.
2019-12-04 13:42:06 -05:00
a8cd34f86d Add support for building from server 2019-12-03 21:21:28 +00:00
222f963ed7 MCOL-3645 - Make ExeMgr destroy joblists in a different thread
Removed a debugging printout.
2019-12-03 12:14:54 -05:00
8812cceccf MCOL-3645 - Make ExeMgr destroy joblists in a different thread
A couple lambdas and a little sync...
2019-12-03 12:06:17 -05: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
a09a9d5d0f Mass substitution 'Corporaton' -> 'Corporation' 2019-08-07 14:43:25 -05:00
e3fe883a9c Fix merge issues 2019-05-14 14:18:11 +01:00
020b211bb7 Merge branch 'develop-1.2' into develop-merge-up-20190514 2019-05-14 13:58:33 +01:00
cdc570bf42 Repairs develop build mode w OAM disabled. Now one can use
-DSKIP_OAM_INIT=1 instead of using environmental variable.
2019-05-13 18:32:35 +03:00
7e2cb05624 MCOL-537 There are no CS-specific warnings building with gcc 8.2. 2019-05-07 16:00:05 +03:00
9022fa426d minor fixups 2019-05-04 02:14:40 -05:00
53afd89bb1 fully qualify identifiers 2019-04-29 02:07:56 -05:00
e5f2a710ef 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:28:54 -05: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
3f2c753947 MCOL-1822-c final checkin 2019-03-05 09:33:39 -06:00
a2aa4b8479 MCOL-1822 Intermediate checkin. DISTINCT not working. 2019-02-25 14:54:46 -06:00
101b36acb6 Merge branch 'develop' into MCOL-520 2018-10-08 14:23:48 -05:00
f1f13a09d1 Merge branch 'develop-1.1' into 1.1-merge-up-2018-10-05 2018-10-05 18:40:07 +01:00
f97dec3406 Merge branch 'fix-skip-oam-init' into MCOL-520 2018-10-04 15:35:32 -05:00
3d7f4a3170 Squash commit of fix-skip-oam-init branch.
Squashed commit of the following:

commit faaee9141a
Author: Patrick LeBlanc <patrick.leblanc@mariadb.com>
Date:   Wed Oct 3 13:03:02 2018 -0500

    Commented a debugging printout.

commit e47e784c53
Author: Patrick LeBlanc <patrick.leblanc@mariadb.com>
Date:   Wed Oct 3 12:13:23 2018 -0500

    Moved the SKIP_OAM_INIT check for cleanliness, added 'config.h' to
    other places that need it.

commit 6626045535
Author: Patrick LeBlanc <patrick.leblanc@mariadb.com>
Date:   Tue Oct 2 16:33:06 2018 -0500

    WIP.  First cut of excising OAM and root access from the dev process.

    This passes most tests; need to make sure that the tests that fail
    have nothing to do with this change.

    DMLProc is doing something that results in a sudo password prompt.
    Will obliterate that next.
2018-10-03 13:04:54 -05:00
6626045535 WIP. First cut of excising OAM and root access from the dev process.
This passes most tests; need to make sure that the tests that fail
have nothing to do with this change.

DMLProc is doing something that results in a sudo password prompt.
Will obliterate that next.
2018-10-02 16:33:06 -05:00
5fa5c81b67 MCOL-520 2018-09-25 14:03:00 -05:00
9cfe199154 MCOL-520 2018-09-25 13:35:06 -05:00
681cfd34eb MCOL-520 2018-09-24 11:50:56 -05:00
14d3a34c28 MCOL-1694 & MCOL-1505 Improved exception handling
This patch catches exceptions in DDLProc, DMLProc and ExeMgr which could
potentially happen during startup. Logging them instead of silently
ignoring them (or crashing in ExeMgr).
2018-09-07 11:43:54 +01:00
03da6df473 Merge branch 'develop-1.1' into 1.1-merge-up-20180817 2018-08-17 16:17:13 +01:00
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
21d8f04a65 Merge branch 'develop-1.1' into 1.1-mergeup-20180224 2018-02-24 11:07:24 -05:00
24f12dcf58 Fix sig handler for ExeMgr
A bad merge for in MCOL-1085 means that ExeMgr is missing the crash
handler. This adds it.
2018-02-12 23:17:41 +00:00
0d7c0f7ae4 Merge branch 'develop-1.1' into dev-merge-up-20180202 2018-02-02 14:53:36 +00:00