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

1124 Commits

Author SHA1 Message Date
1c297b9e9e feat(): dangling pointer/ref issue has been solved for both RGData and BS 2024-12-13 15:56:28 +00:00
fac7dfa552 feat(): change ref to atomic with ptr to atomic 2024-12-09 10:38:11 +00:00
937d09768b feat(): propagate long strings SP type change 2024-12-04 23:45:05 +00:00
789a382be2 feat(): use boost::make_shared b/c most distros can't do allocate_shared for array types. 2024-12-03 22:40:53 +00:00
5383e7c5a2 feat(RGData,StringStore): add counting allocator capabilities to those ctors used in BPP::execute() 2024-11-30 18:51:29 +00:00
51374aef4d feat(PP,ByteStream): new counting memory allocator 2024-11-22 10:11:37 +00:00
afef46cbc7 fix(PrimProc): MCOL-5651 Add a workaround to avoid choosing an incorrect TupleHashJoinStep as a joiner [develop-23.02] (#3330)
* fix(PrimProc): MCOL-5651 Add a workaround to avoid choosing an incorrect TupleHashJoinStep as a joiner
2024-11-08 17:43:18 +00:00
f2234eba1b fix(join, UM, perf): UM join is multi-threaded now (#3286)
* chore: UM join is multi-threaded now

* fix(UMjoin):  replace TR1 maps with stdlib versions
2024-08-28 20:18:57 +03:00
66b450026e fix: MCOL-4696: get rid of boost::iequals to avoid using system collation (#3281)
Co-authored-by: Leonid Fedorov <leonid.fedorov@mariadb.com>
2024-08-17 21:10:43 +01:00
a1b4a49d5c feat(SM): MCOL-5785 S3Storage improvements [develop-23.02] (#3270)
Update libmarias3
fix build with the recent libmarias3

feat(SM): MCOL-5785 Add timeout options for S3Storage

    In some unfortunate situations StorageManager may get stuck on
    network operations. This commit adds the ability to set network
    timeouts which will help to ensure that the system is more
    responsive.

feat(SM): MCOL-5785 Add smps & smkill tools

    * `smps` shows all active S3 network operations
    * `smkill` terminates S3 network operations

    NB! At the moment smkill is able to terminate operations
    that are stuck on retries, but not hang inside the libcurl
    call. In other words if you want to terminate all operations
    you should configure `connect_timeout` & `timeout`

Install smkill & smps

Add install for new binaries
2024-08-17 20:59:29 +01:00
0ff88e860f fix(threadpool): MCOL-5645 errenous threadpool Job ctor implictly sets socket shared_ptr to nullptr causing sigabrt when threadpool returns an error (#3125) 2024-02-12 12:33:24 +03:00
c46a0ab5f0 bug(funcexp): Fixes MCOL-5599 where LIKE operator never finishes (#3116)
This is a fix of logging subsystem, nothing else.

The old code expanded an argument into string and advanced too little
and, if expansion contained argument's index, it expanded it again. And
again.

Co-authored-by: Serguey Zefirov <serguey.zefirov@mariadb.com>
2024-02-05 18:31:57 +03:00
4a2c73780a fix(messageqcpp): MCOL-5636 same node communication crashes transmiting PP errors to EM b/c error messaging leveraged socket that was a nullptr. (#3106) 2024-01-17 20:18:23 +03:00
79ad78f91f fix(threadpool): MCOL-5565 queries stuck in FairThreadScheduler. (#3100)
Meta Primitive Jobs, .e.g ADD_JOINER, LAST_JOINER stuck
	in Fair scheduler without out-of-band scheduler. Add OOB
	scheduler back to remedy the issue.
2024-01-13 11:54:08 +03:00
2eca3ee656 fix(funcexp): MCOL-5607: JSON function use crashes query execution (#3028)
JSON functions were implemented violating an assumption of their
pureness, as they should not have any state. This concrete patch
fixes implementation of JSON_VALUE function.
2024-01-10 14:51:28 +00:00
1935c9c1da MCOL-5625: Fixes json_query implementation
Also extends func_json_value.test.
2024-01-10 18:22:16 +04:00
2802e2810f fix(pp-threadpool): MCOL-5565 the workaround for a stuck tests001 in CI (#2947)
CI ocassionaly stuck running test001 b/c PP threadpool endlessly reschedules
    meta jobs, e.g. BATCH_PRIMITIVE_CREATE, which ByteStreams were somehow damaged or read out.

Co-authored-by: Leonid Fedorov <leonid.fedorov@mariadb.com>
2023-09-01 18:09:44 +03:00
5258ab03cf compiler failures with gcc 12.x
a workaround for something that looks like a bug in a compiler.
Fixes errors like

In file included from /usr/include/c++/12/string:40,
                 from /mnt/server/storage/columnstore/columnstore/utils/funcexp/func_math.cpp:26:
In static member function ‘static constexpr std::char_traits<char>::char_type* std::char_traits<char>::copy(char_type*, const char_type*, std::size_t)’,
    inlined from ‘static constexpr void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_S_copy(_CharT*, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.h:423:21,
    inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_M_replace(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.tcc:532:22,
    inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.h:2171:19,
    inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.h:1928:22,
    inlined from ‘virtual std::string funcexp::Func_format::getStrVal(rowgroup::Row&, funcexp::FunctionParm&, bool&, execplan::CalpontSystemCatalog::ColType&)’ at /mnt/server/storage/columnstore/columnstore/utils/funcexp/func_math.cpp:2008:17:
/usr/include/c++/12/bits/char_traits.h:431:56: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372036854775810 or more bytes at offsets 3 and [2, 2147483645] may overlap up to 9223372036854775813 bytes at offset -3 [-Werror=restrict]
  431 |         return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n );

$ gcc --version
gcc (Ubuntu 12.2.0-3ubuntu1) 12.2.0
2023-06-29 18:39:35 -04:00
4b5c790b21 compiler warning with gcc 13.0.1
utils/funcexp/func_between.cpp:246:21: error: possibly dangling reference to a temporary [-Werror=dangling-reference]

use datatypes::Charset().getCharset() like it's used everywhere else
2023-06-29 18:39:35 -04:00
4c3274affb MCOL-5500 Remove another noisy printout. (#2887)
Co-authored-by: Roman Nozdrin <rnozdrin@mariadb.com>
2023-06-29 15:42:54 +03:00
f387219de0 MCOL-5500 Remove noisy printout from CGroupConfigurator method 2023-06-19 11:23:50 +00:00
d7d5e2211b MCOL-5175 Bump overlooked libmariaS3 and added more ENV variables to fine tune initial installation on S3 (#2869)
Co-authored-by: Roman Nozdrin <rnozdrin@mariadb.com>
2023-06-18 13:35:26 +03:00
06364513fa MCOL-5500 This patch adds cgroup v2 support with some sanity checks for (#2850)
values reported by cgroups v1
2023-06-09 17:37:32 +03:00
23a969dbe2 MCOL-5175 Increase the maximum effective length of S3 secret used as SHA256 key producing S3 signature (#2860)
Co-authored-by: Roman Nozdrin <rnozdrin@mariadb.com>
2023-06-07 15:24:42 +03:00
1be5090ffe Fix brocen quoter 2023-06-02 13:31:16 +00:00
5278865430 MCOL-5437 Fixes to follow the charset_info api change introduced by MDEV-30661 2023-05-01 16:04:21 -04:00
c0c18511f6 MCOL-5456 codebase preparation for colab with CS 11.1 2023-05-01 16:04:21 -04:00
55d4214429 MCOL-5429 Fix high memory consumption in GROUP_CONCAT() processing. (#2823)
1. Input and output RowGroup's used in GROUP_CONCAT classes
are currently allocating a raw memory buffer of size equal
to the actual width of the string datatype. As an example,
for the following query:
  SELECT col1, GROUP_CONCAT(col2) FROM t GROUP BY col1;
If col2 is a TEXT field with default width, the input
RowGroup containing the target rows to be concatenated will
assign 64kb of memory for every input row in the RowGroup.
This is wasteful as actual field values in real workloads
would be much smaller. We fix this by enabling the
RowGroup to use the StringStore when the RowGroup contains
long strings.

2. RowAggregation::initialize() allocates a memory buffer
for a NULL row. The size of this buffer is equal to the
row size for the output RowGroup. For the above scenario,
using the default group_concat_max_len (which is a server
variable that sets the maximum length of the GROUP_CONCAT string)
value of 1mb, the buffer size would be
(1mb + 64kb + some additional metadata). If the user sets
group_concat_max_len to a higher value, say 3gb, this buffer
size would be ~3gb. Now if the runtime initiates several
instances of RowAggregation, total memory consumption by
PrimProc could exceed the hardware memory limits causing the
OS OOM to kill the process. We fix this problem by again
enabling the StringStore for the NULL row allocation.

3. In the plugin code in buildAggregateColumn(), there is
an integer overflow when the server group_concat_max_len
variable (which is an uint32_t) is set to a value > INT32_MAX
(such as 3gb) and is assigned to
CalpontSystemCatalog::ColType::colWidth (which is an int32_t).
As a short term fix, we saturate the assigned value to colWidth
to INT32_MAX. Proper fix would be to upgrade
CalpontSystemCatalog::ColType::colWidth to an uint32_t.
2023-04-22 00:43:29 +03:00
030144127e Remove boost shared array [develop 23.02] (#2812)
* remove boost/shared_array include

* replace boost::shared_array<T> to std::shared_ptr<T[]>
2023-04-17 20:56:09 +03:00
f1697c261e MCOL-5385 set data extermination [develop-23.02] (#2813)
* Delete RowGroup::setData and make Pointer ctor explicit

* some push_backs replaced with emplace_backs

* Fixes of review notes
2023-04-16 15:57:39 +03:00
2f153184c3 Fixes of bugs from ASAN warnings, part one (#2796) 2023-03-30 18:29:04 +03:00
a1d20d82d5 MCOL-5451 This resolves external GROUP BY result inconsistency issues (#2791)
Given that idx is a RH hashmap bucket number and info is intra-bucket idx
    the root cause is triggered by the difference of idx/hash pair
    calculation for a certain GROUP BY generation and for generation
    aggregations merging that takes place in RowAggStorage::finalize.
    This patch generalizes rowHashToIdx to leverage it in both cases
    mentioned above.
2023-03-28 19:10:41 +03:00
7f3d540841 MCOL-5438 COUNT() in math causes SEGV (#2769)
Co-authored-by: Roman Nozdrin <rnozdrin@mariadb.com>
2023-03-10 19:32:17 +03:00
56f2346083 Remove windows ifdefs 2023-03-02 15:59:42 +00:00
123c345b40 remove winport 2023-03-02 15:37:11 +00:00
8bf545bc2e MDEV-25080 Fix a corner case in DataConvert::joinColTypeForUnion(). 2023-02-27 09:01:24 -05:00
4e2123ca80 MDEV-25080 Fix some corner cases in DataConvert::joinColTypeForUnion(). 2023-02-27 06:38:31 -05:00
86dcf92d56 MCOL-5215 Fix overflow of UNION operation involving DECIMAL datatypes.
When a UNION operation involving DECIMAL datatypes with scale and digits
before the decimal exceeds the currently supported maximum precision
of 38, we throw an error to the user:
"MCS-2060: Union operation exceeds maximum DECIMAL precision of 38".

This is until MCOL-5417 is implemented where ColumnStore will have
full parity with MariaDB server in terms of maximum supported DECIMAL
precision and scale of 65 and 38 digits respectively.
2023-02-27 06:38:31 -05:00
f7118b53a8 Turn on ASAN for unitests (#2719)
Fix asan error on compression tests
Fix warn of nonreturn function
2023-02-02 15:08:01 +02:00
20b5dbb617 Add missing includes
These seem to have all fallen out of a recent Boost update to 1.81 which
dropped some internal includes. All of these uses within columnstore
relied on these transitive includes, so explicitly include what we need
to fix build.

Signed-off-by: Sam James <sam@gentoo.org>
2023-01-17 01:18:41 +00:00
3b68353429 remove commited old thrift, replace with static lib build from exterrnal project 2023-01-16 15:37:01 +03:00
d42485656c Fix clang 16 warnings for comfort build 2023-01-12 22:11:28 +03:00
10e2834033 patch_out_of_band
Some changes made to 10.6-enterprise make a build using the out-of-band method of compiling columnstore not work. Out-of band means the source for the engine is not in the storage subdir of server, but rather in a stand alone directory. This is used by developers for easier develop work. In the case of out-of-band, INSTALL_LAYOUT is false in CMakeLists.txt
2022-12-12 14:17:09 -06:00
a1d89d8f31 Merge pull request #2630 from dhall-MariaDB/sergchanges
Sergchanges
2022-12-02 19:08:08 +03:00
9a919cdc0b Merge pull request #2642 from tntnatbry/MCOL-5306
MCOL-5306 Re-read the config (Columnstore.xml) file if it was updated.
2022-12-02 17:57:24 +03:00
9bf35d74d4 MCOL-5306 Re-read the config (Columnstore.xml) file if it was updated.
The existing implementation of Config::makeConfig() factory method
was returning a possibly stale config to the caller, without checking
if the config file was updated since the last read. This bug triggered
a scenario as described in MCOL-5306 where after a failover in an MCS
cluster, the controllernode coordinates changed in the config file
after failover and the existing mariadbd process was still using the
old controllernode coordinates. This lead to failed network connection
between mariadbd and the new controllernode.

The change in this fix, however, is more generic and not just limited
to this above scenario.
2022-12-02 06:30:46 +00:00
ef0a21267e MCOL-5248 Change func_truncate() to use double for string, rather than attempt to translate to decimal. Currently, the treenode.h conversion functions don't support string to decimal conversion. (#2598)
This new functionality brings us into alignment with MDB 10.6
2022-11-30 19:58:25 +03:00
246a4db8de fix C API includes
ColumnStore used to include server's mysql.h
but link all tools with libmariadb.so

There's no guarantee that this would work, even with workarounds
it had in dbcon/mysql/sm.cpp

Fix:
* tools (linked with libmariadb.so) *must* include libmariadb's mysql.h
* as a hack prevent service_thd_timezone.h from being loaded into tools,
  as it conflicts with libmariadb's mysql.h
* server plugin *must* include server's mysql.h
* also don't link every tool with libmariadb.so, link the helper library
  (liblibmysqlclient.so) that actually needs it, tools use this
  helper library, not libmariadb.so directly
2022-11-17 12:02:07 -06:00
21c3bbce16 do *not* link ha_columnstore.so with libmariadb.so
this means some libraries have to be compiled twice -
for tools with libmariadb.so and for plugin, without.
2022-11-17 11:53:42 -06:00
8642231666 Changes to compile local 2022-11-17 11:29:21 -06:00