Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CBRD-25447] Support parallel heap scan #5716

Draft
wants to merge 25 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b59b5a2
init
xmilex-git Dec 4, 2024
91c54f3
add classes
xmilex-git Dec 9, 2024
e18c422
private pred_expr, attr_caches
xmilex-git Dec 12, 2024
0252fe3
db_class (change to private heap and notifying)
xmilex-git Dec 13, 2024
6bb6085
Merge branch 'CUBRID:develop' into parallel_heap_scan
xmilex-git Dec 13, 2024
03d8fff
code style
xmilex-git Dec 13, 2024
084da10
only for user table
xmilex-git Dec 13, 2024
9594c90
parallel_heap_scan with multiple threads
xmilex-git Dec 16, 2024
4dbc4a8
[CBRD-25356] rename att_name in db_serial to attr_name (#5346)
vimkim Dec 13, 2024
7433102
[CBRD-25706] change external lib URLs of lz4, re2 and win flex/bison …
kisoo-han Dec 15, 2024
3f4b13b
[CBRD-25737] When unloading serial and trigger as dba user, schema na…
airnet73 Dec 16, 2024
fd79f93
[APIS-1010] Update JDBC version to 11.3.0 (#5715)
airnet73 Dec 16, 2024
ebd4154
[CBRD-25651] Improve Error Message Logging for HA Failover / Failback…
YeunjunLee Dec 16, 2024
fa96e95
Merge branch 'CUBRID:develop' into parallel_heap_scan
xmilex-git Dec 16, 2024
cd398f7
shouldn't have to alloc attrinfo->values, its allocated in start_scan
xmilex-git Dec 17, 2024
da6f828
add flag for not parallel heap scan
xmilex-git Dec 18, 2024
e8d0ef6
add flag for not parallel heap scan
xmilex-git Dec 18, 2024
6f5566a
codestyle
xmilex-git Dec 18, 2024
18d3280
Merge branch 'CUBRID:develop' into parallel_heap_scan
xmilex-git Dec 18, 2024
c7dd41e
parallel 2
xmilex-git Dec 18, 2024
9fbb74e
Merge branch 'CUBRID:develop' into parallel_heap_scan
xmilex-git Dec 18, 2024
78b9902
Merge branch 'CUBRID:develop' into parallel_heap_scan
xmilex-git Dec 23, 2024
3529588
dptr and scan_proc, disable and some fixes about flags
xmilex-git Dec 23, 2024
c034519
code style
xmilex-git Dec 23, 2024
55d4601
code style
xmilex-git Dec 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cubrid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ set(QUERY_SOURCES
${QUERY_DIR}/string_regex_re2.cpp
${QUERY_DIR}/vacuum.c
${QUERY_DIR}/xasl_cache.c
${QUERY_DIR}/parallel_heap_scan.cpp
)
set(QUERY_HEADERS
${QUERY_DIR}/query_aggregate.hpp
Expand Down
1 change: 1 addition & 0 deletions sa/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ set(QUERY_SOURCES
${QUERY_DIR}/vacuum.c
${QUERY_DIR}/xasl_cache.c
${QUERY_DIR}/xasl_to_stream.c
${QUERY_DIR}/parallel_heap_scan.cpp
)
set(QUERY_HEADERS
${QUERY_DIR}/query_aggregate.hpp
Expand Down
3 changes: 2 additions & 1 deletion src/parser/parse_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -1741,7 +1741,8 @@ typedef enum
PT_SPEC_FLAG_MVCC_ASSIGN_REEV = 0x800, /* the spec is used in UPDATE assignment reevaluation */
PT_SPEC_FLAG_DOESNT_HAVE_UNIQUE = 0x1000, /* the spec was checked and does not have any uniques */
PT_SPEC_FLAG_SAMPLING_SCAN = 0x2000, /* spec for sampling scan */
PT_SPEC_FLAG_REFERENCED_AT_ODKU = 0x4000 /* spec for odku assignment */
PT_SPEC_FLAG_REFERENCED_AT_ODKU = 0x4000, /* spec for odku assignment */
PT_SPEC_FLAG_NOT_FOR_PARALLEL_HEAP_SCAN = 0x8000 /* spec for not for parallel heap scan */
} PT_SPEC_FLAG;

typedef enum
Expand Down
21 changes: 21 additions & 0 deletions src/parser/xasl_generation.c
Original file line number Diff line number Diff line change
Expand Up @@ -9982,6 +9982,19 @@ pt_attribute_to_regu (PARSER_CONTEXT * parser, PT_NODE * attr)
/* The attribute is correlated variable. Find it in an enclosing scope(s). Note that this subquery has
* also just been determined to be a correlated subquery. */
REGU_VARIABLE_SET_FLAG (regu, REGU_VARIABLE_CORRELATED);

for (table_info = symbols->table_info; table_info != NULL; table_info = table_info->next)
{
PT_SPEC_FLAG flag = table_info->class_spec->info.spec.flag;
if (table_info->class_spec)
{
table_info->class_spec->info.spec.flag =
(PT_SPEC_FLAG) (flag | PT_SPEC_FLAG_NOT_FOR_PARALLEL_HEAP_SCAN);
}
}

table_info = NULL;

if (symbols->stack == NULL)
{
if (!pt_has_error (parser))
Expand Down Expand Up @@ -12204,6 +12217,7 @@ pt_to_class_spec_list (PARSER_CONTEXT * parser, PT_NODE * spec, PT_NODE * where_
OUTPTR_LIST *output_val_list = NULL;
REGU_VARIABLE_LIST regu_var_list = NULL;
DB_VALUE **db_values_array_p = NULL;
bool is_parallel_heap_scan_callable = true;

assert (parser != NULL);

Expand Down Expand Up @@ -12259,10 +12273,12 @@ pt_to_class_spec_list (PARSER_CONTEXT * parser, PT_NODE * spec, PT_NODE * where_
if (PT_IS_VALUE_QUERY (spec))
{
scan_type = TARGET_REGUVAL_LIST;
is_parallel_heap_scan_callable = false;
}
else if (spec->info.spec.meta_class == PT_META_CLASS)
{
scan_type = TARGET_CLASS_ATTR;
is_parallel_heap_scan_callable = false;
}
else
{
Expand Down Expand Up @@ -12569,6 +12585,10 @@ pt_to_class_spec_list (PARSER_CONTEXT * parser, PT_NODE * spec, PT_NODE * where_
{
access->flags = (ACCESS_SPEC_FLAG) (access->flags | ACCESS_SPEC_FLAG_FOR_UPDATE);
}
if (!is_parallel_heap_scan_callable || (spec->info.spec.flag & PT_SPEC_FLAG_NOT_FOR_PARALLEL_HEAP_SCAN))
{
access->flags = (ACCESS_SPEC_FLAG) (access->flags | ACCESS_SPEC_FLAG_NOT_FOR_PARALLEL_HEAP_SCAN);
}

access->next = access_list;
access_list = access;
Expand Down Expand Up @@ -14279,6 +14299,7 @@ ptqo_to_scan_proc (PARSER_CONTEXT * parser, QO_PLAN * plan, XASL_NODE * xasl, PT

if (spec != NULL)
{
spec->info.spec.flag = (PT_SPEC_FLAG) (spec->info.spec.flag | PT_SPEC_FLAG_NOT_FOR_PARALLEL_HEAP_SCAN);
xasl->spec_list = pt_to_spec_list (parser, spec, where_key_part, where_part, plan, info, NULL, where_hash_part);
if (xasl->spec_list == NULL)
{
Expand Down
Loading
Loading