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

43 Commits

Author SHA1 Message Date
318db3ef84 feat(brm): MCOL-5623 This patch changes the logic applied to save function for EM (#3076) 2023-12-27 09:48:29 +03:00
7ca4b9da32 feat(brm): MCOL-5631 Optimize BRM load operation. (#3085) 2023-12-27 09:43:27 +03:00
5f4d2705fd fix(brm): This refactors shmem RWLocks operations for EM, EMIndex and FreeList so that re-map operation always takes shmem lock in Exclusive mode
---------

Co-authored-by: Roman Nozdrin <rnozdrin@mariadb.com>
2023-09-06 21:07:44 +03:00
4a8e53f14d Atomic bools for RWLockMonitor 2023-04-21 13:23:58 +00:00
56f2346083 Remove windows ifdefs 2023-03-02 15:59:42 +00:00
b5d8e0324b extentmap iterator (#2540) 2022-08-29 13:30:03 +03:00
c049d85d63 MCOL-5206 This patch brings some EMIndex and treeish EM leftovers from develop-5 2022-08-24 19:13:34 +00:00
2f5f9cdbe1 MCOL-5091/MCOL-4917 ExtentMap as RBTree.
This patch replaces a `linear array` to `Red black tree` for ExtentMap.
2022-08-23 17:33:16 +03:00
de522ed15a Fix: grabEMIndex for loadFromBinaryBlob 2022-07-28 16:47:27 +03:00
8bf4e0eaa5 MCOL-5050 EM Index dbroot container out-of-bound access checks doing EM deletes 2022-05-17 12:53:33 +00: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
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
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
04752ec546 clang format apply 2022-01-21 16:43:49 +00:00
c58136a32d MCOL-4741 in/like/equal(=) operations differ in results
This is due to signedness in the string range comparison in extentmap
and unsignedness everywhere else.
2021-07-02 19:22:46 +03:00
606194e6e4 MCOL-4685: Eliminate some irrelevant settings (uncompressed data and extents per file).
This patch:
1. Removes the option to declare uncompressed columns (set columnstore_compression_type = 0).
2. Ignores [COMMENT '[compression=0] option at table or column level (no error messages, just disregard).
3. Removes the option to set more than 2 extents per file (ExtentsPreSegmentFile).
4. Updates rebuildEM tool to support up to 10 dictionary extent per dictionary segment file.
5. Adds check for `DBRootStorageType` for rebuildEM tool.
6. Renamed rebuildEM to mcsRebuildEM.
2021-06-03 14:44:33 +03:00
47b1430121 Fixes to COMMIT operation logic to keep ranges in valid state 2021-05-17 14:23:43 +03:00
4545a86a80 Porting old MCOL-2044-update...: new interface for writeColRecs
Progress keep and test commit

Progress keep and test commit

Progress keep and test commit

Again, trying to pinpoint problematic part of a change

Revert "Again, trying to pinpoint problematic part of a change"

This reverts commit 71874e7c0d7e4eeed0c201b12d306b583c07b9e2.

Revert "Progress keep and test commit"

This reverts commit 63c7bc67ae55bdb81433ca58bbd239d6171a1031.

Revert "Progress keep and test commit"

This reverts commit 121c09febd78dacd37158caeab9ac70f65b493df.

Small steps - I walk minefield here

Propagating changes - now CPInfo in convertValArray

Progress keep commit

Restoring old functionality

Progress keep commit

Small steps to avoid/better locate old problem with the write engine.

Progress keeping commit

Thread the CPInfo up to convertValArray call in writeColumnRec

About to test changes - I should get no regression and no updates in
ranges either.

Testing out why I get a regression

Investigating source of regression

Debugging prints

Fix compile error

Debugging print - debug regression

I clearly see calls to writeColumnRec and prints there added to discern
between these.

Fix warning error

Possible culprit

Add forgotten default parameter for convertValArray

New logic to test

Max/min gets updated during value conversion

To test results of updates

Debug logs

Debug logs

An attempt to provide proper sequence index

Debug logs

An attempt to provide proper sequence index - now magic for resetting

Debug logs

Debug logs

Debug logs

Trying to perform correct updates

Trying to perform correct updates - seqNum woes fight

COMMIT after INSERT performs 'mark extent as invalid' operation - investigating

To test: cut setting of CPInfo upon commit from DML processor

It may be superfluous as write engine does that too

Debug logs

Debug logs

Better interface for CPMaxMin

Old interface forgot to set isBinaryColumn field

Possible fix for the problems

I forgot to reassign the value in cpinfoList

Debug logs

Computation of 'binary' column property

logs indicated that it was not set in getExtentCPMaxMin, and it was impossible to compute there so I had to move that into writeengine.

To test: code to allow cross-extent insertion

To test: removed another assertion for probable cause of errors

Debug logs

Dropped excessive logs

Better reset code

Again, trying to fix ordering

Fixing order of rowids for LBID computation

Debug logs

Remove update of second LBID in split insert

I have to validate incorrect behaviour for this test

Restoring the case where everything almost worked

Tracking changes in newly created extents

Progress keeping commit

Fixing build errors with recent server

An ability to get old values from blocks we update

Progress keeping commit

Adding analysis of old values to write engine code.

It is needed for updates and deletes.

Progress keeping commit

Moving max/min range update from convertValArray into separate function with simpler logic.

To test and debug - logic is there

Fix build errors

Update logic to debug

There is a suspicious write engine method updateColumnRecs which
receives a vector of column types but does not iterate over them
(otherwise it will be identical to updateColumnRec in logic).

Other than that, the updateColumnRec looks like the center of all
updates - deleteRow calls it, for example, dml processor also calls it.

Debug logs for insert bookkeeping regression

Set up operation type in externally-callable interface

Internal operations depend on the operation type and consistency is what matters there.

Debug logs

Fix for extent range update failure during update operation

Fix build error

Debug logs

Fix for update on deletion

I am not completely sure in it - to debug.

Debug log

writeColumnRec cannot set m_opType to UPDATE unconditionally

It is called from deleteRow

Better diagnostics

Debug logs

Fixed search condition

Debug logs

Debugging invalid LBID appearance

Debug logs - fixed condition

Fix problems with std::vector reallocation during growth

Fix growing std::vector data dangling access error

Still fixing indexing errors

Make in-range update to work

Correct sequence numbers

Debug logs

Debug logs

Remove range drop from DML part of write engine

A hack to test the culprit of range non-keeping

Tests - no results for now

MTR-style comments

Empty test results

To be filled with actual results.

Special database and result selects for all tests

Pleasing MTR with better folder name

Pleasing MTR - testing test result comparison

Pleasing MTR by disabling warnings

All test results

Cleaning up result files

Reset ranges before update

Remove comments from results - point of failure in MTR

Remove empty line from result - another MTR failure point

Probably fix for deletes

Possible fix for remaining failed delete test

Fix a bug in writeRows

It should not affect delete-with-range test case, yet it is a bug.

Debug logs

Debug logs

Tests reorganization and description

Support for unsigned integer for new tests

Fix type omission

Fix test failure due to warnings on clean installation

Support for bigint to test

Fix for failed signed bigint test

Set proper unsignedness flag

Removed that assignment during refactoring.

Tests for types with column width 1 and 2

Support for types in new tests

Remove trailing empty lines from results

Tests had failed because of extra empty lines.

Remove debug logs

Update README with info about new tests

Move tests for easier testing

Add task tag to tests

Fix invalid unsaigned range check

Fix for signed types

Fix regressions - progress keeping commit

Do not set invalid ranges into valid state

A possible fix for mcs81_self_join test

MCOL 2044 test database cleanup

Missing expected results

Delete extraneous assignment to m_opType

nullptr instead of NULL

Refactor extended CPInfo with TypeHandler

Better handling of ranges - safer types, less copy-paste

Fix logic error related to typo

Fix logic error related to typo

Trying to figure out why invalid ranges aren't displayed as NULL..NULL

Debug logs

Debug logs

Debug logs

Debug logs for worker node

Debug logs for worker node in extent map

Debugging virtual table fill operation

Debugging virtual table fill operation

Fix for invalid range  computation

Remove debug logs

Change handling of invalid ranges

They are also set, but to invalid state.

Complete change

Fix typo

Remove unused code

"Fix" for tests - -1..0 instead of NULL..NULL for invalid unsigned ranges

Not a good change, yet I cannot do better for now.

MTR output requires tabs instead of spaces

Debug logs

Debug logs

Debug logs - fix build

Debug logs and logic error fix

Fix for clearly incorrect firstLBID in CPInfo being set - to test

Fix for system catalog operations suppot

Better interface to fix build errors

Delete tests we cannot satisfy due to extent rescan due to WHERE

Tests for wide decimals

Testing support for wide decimals

Fix for wide decimals tests

Fix for delete within range

Memory leak fix and, possible, double free fix

Dispatch on CalpontSystemCatalog::ColDataType is more robust

Add support for forgotten MEDINT type

Add forgottent BIGINT

empty() instead of size() > 0

Better layout

Remove confusing comment

Sensible names for special values of seqNum field

Tests for wide decimal support

Addressing concerns of drrtuy

Remove test we cannot satisfy

Final touches for PR

Remove unused result file
2021-04-05 14:18:22 +03:00
5d497e8821 MCOL-4566: Add rebuildEM tool support to work with compressed files.
* This patch adds rebuildEM tool support to work with compressed files.
* This patch increases a version of the file header.

Note: Default version of the `rebuildEM` tool was using very old API,
those functions are not present currently. So `rebuildEM` will not work with
files created without compression, because we cannot deduce some info which are
needed to create column extent.
2021-04-02 10:55:01 +03:00
d5c6645ba1 Adding mcs_basic_types.h
For now it consists of only:

using int128_t = __int128;
using uint128_t = unsigned __int128;

All new privitive data types should go into this file in the future.
2020-11-18 13:53:15 +00:00
129d5b5a0f MCOL-4174 Review/refactor frontend/connector code 2020-11-18 13:53:15 +00:00
88e106f018 MCOL-641 Ternary operation with different datatype of the two
resulting expressions cannot be used as a template argument.
This is because the template instantiation happens at compile time
and cannot depend on the runtime value of the evaluating expression.
2020-11-18 13:52:20 +00:00
62c1c1e0e2 Remove hi_val/lo_val data members from EMCasualPartition_struct
and use the union members instead.
2020-11-18 13:52:19 +00:00
5287e6860b MCOL-641 Upgrade code for extent map from v4 to v5.
v5 (current) version of the extent map supports int128_t min/max
values. This commit provides upgrade capability to load_brm program
that when reads an extent map saved to disk earlier with save_brm,
with a EM_MAGIC_V4 entry, converts it to the current v5 "wider"
extent map.
2020-11-18 13:52:19 +00:00
d3bc68b02f MCOL-641 Refactor initial extent elimination support.
This commit also adds support in TupleHashJoinStep::forwardCPData,
although we currently do not support wide decimals as join keys.

Row estimation to determine large-side of the join is also updated.
2020-11-18 13:52:19 +00:00
55afcd8890 MCOL-641 Basic extent elimination support for Decimal38. 2020-11-18 13:47:01 +00: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
62c7ab6480 Fixed a merge error. 2019-08-05 16:35:59 -05:00
295c638c18 Merge branch 'develop' into S3-project 2019-08-05 16:34:45 -05:00
16dc887f20 Incremental commit. Stripping out the OBE fstream IO code. 2019-07-12 10:06:56 -05:00
b30ee07318 Merge remote-tracking branch 'upstream/develop' into S3-project 2019-06-24 15:41:10 -05:00
bcdd76adc0 Fixed a bug in the new extentmap saving code. 2019-06-14 11:50:47 -05:00
603cbc9314 First cut of improving IO behavior for BRM load/save 2019-06-13 16:14:00 -05:00
3d67df18bf Merge branch 'develop' of github.com:mariadb-corporation/mariadb-columnstore-engine into S3-project 2019-05-17 13:24:09 -05:00
9dc33c4e82 Another try to cope with warnings under gcc 8.2. 2019-04-29 11:05:03 +03:00
6e6cfdb59b The BRM structs aren't using IDBDataFile consistently.
Testing whether forcing them to use IDBDataFiles breaks anything.
2019-04-09 15:07:00 -05:00
82bd9e29f5 Merge branch 'develop-1.1' into 1.1-merge-up-2018-12-20b 2018-12-20 20:55:00 +00:00
3fc1893ce9 MCOL-1347 BRM_INFO is fixed and could be used for BRM debugging. 2018-12-05 13:39:21 -08:00
01446d1e22 Reformat all code to coding standard 2017-10-26 17:18:17 +01:00
ffcfc41563 MCOL-507 Further ExeMgr performance improvements
This does the following:

* Switch resource manager to a singleton which reduces the amount of
times the XML data is scanned and objects allocated.
* Make the I_S tables use the FE implementation of the system catalog
* Make the I_S.columnstore_columns table use the RID list cache
* Make the extentmap pre-allocate a vector instead of many small allocs
2017-01-16 12:33:27 +00:00
7d8de28b43 MCOL-59, change calpont.xml 2016-06-22 16:00:00 -05:00
f6afc42dd0 the begginning 2016-01-06 14:08:59 -06:00