[MCOL-4000] Add an option to allow using cpimport for LDI and INSERT..SELECT in a transaction Created: 2020-05-12 Updated: 2020-05-19 Resolved: 2020-05-19 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | MDB Plugin |
| Affects Version/s: | 1.4.3 |
| Fix Version/s: | 1.4.4 |
| Type: | Task | Priority: | Major |
| Reporter: | Gagan Goel (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Sprint: | 2020-7 | ||||||||
| Description |
|
CS has a session variable, columnstore_use_import_for_batchinsert, that has 2 values, ON (default) and OFF. This allows a user to set the option of using cpimport (ON) or the regular DML (OFF) for LDI and INSERT SELECT statements. If a user performs these queries in a transaction (such as by setting autocommit=0 or using the START TRANSACTION statement), however, CS fallsback to using DML for the operation. This behaviour is because of the current limitation of cpimport to handle rollbacks. We want to add a third option to columnstore_use_import_for_batchinsert: ALWAYS. This value will always use cpimport for LDI and INSERT SELECT queries, irrespective of whether the query runs in a transaction or not. This gives the user the ability to use a faster import method, with the caveat that if a user issues a rollback of the transaction, it will have no effect as the data would have already been committed to actual database files by cpimport. |
| Comments |
| Comment by Gagan Goel (Inactive) [ 2020-05-13 ] |
|
Following values can be used for columnstore_use_import_for_batchinsert: OFF (0): Do not use cpimport for LDI or INSERT..SELECT The session variable can be changed for either the current session using the 'set' command, For QA: 1. First test the current default behaviour, i.e. columnstore_use_import_for_batchinsert=ON:
2. Test the new behaviour by setting columnstore_use_import_for_batchinsert=ALWAYS:
Same tests can be repeated for INSERT ... SELECT. |
| Comment by Gagan Goel (Inactive) [ 2020-05-15 ] |
|
For QA: I have added instructions above on how to test this feature. In addition, we have added test cases to the regression suite for this: mysql/queries/working_dml/misc/ |
| Comment by Daniel Lee (Inactive) [ 2020-05-19 ] |
|
Created |
| Comment by Daniel Lee (Inactive) [ 2020-05-19 ] |
|
Build verified: 1.4.4-1 (Jenkins 20200518) Tested all these modes (On, Off, Always) for the columnstore_use_import_for_batchinsert variable, with and without transaction. Tested for commit, auto commit, and rollback, for both LDI and insert..select. |