Skip to content

[opt](index compaction) optimize checks before index compaction - #25486

Merged
xiaokang merged 2 commits into
apache:masterfrom
qidaye:index_compaction_checks
Oct 26, 2023
Merged

[opt](index compaction) optimize checks before index compaction#25486
xiaokang merged 2 commits into
apache:masterfrom
qidaye:index_compaction_checks

Conversation

@qidaye

@qidayeqidaye commented Oct 16, 2023

Copy link
Copy Markdown
Contributor

Proposed changes

If inverted index file is empty or corrupted, the index compaction will crash.
So we add more checks before apply index compaction.

index file count tests

CREATETABLEt1
(
k1 int ,
k2 string,
k3 char(50),
k4 varchar(200),
k5 int,
index index_int (k1) using inverted,
index index_str_k2 (k2) using inverted properties("parser"="english"),
index index_str_k4 (k4) using inverted,
index index_k5 (k5) using inverted
)
DISTRIBUTED BY RANDOM BUCKETS 1
PROPERTIES("replication_num"="1");
-- q1insert into t1 values(1, "json love anny", "json", "anny",1);
-- q2insert into t1 values(1, "", "", "",null);
-- q3insert into t1 values(1, null, null, null,null);

index file list

image

  1. q1
    image

  2. q2
    image

  3. q3
    image

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@qidaye

Copy link
Copy Markdown
ContributorAuthor

run buildall

@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@wm1581066wm1581066 added dev/2.0.3 usercase Important user case type label labels Oct 16, 2023
@doris-robot

Copy link
Copy Markdown

TeamCity be ut coverage result:
Function Coverage: 36.70% (8230/22423)
Line Coverage: 28.84% (65960/228694)
Region Coverage: 27.55% (34214/124169)
Branch Coverage: 24.26% (17418/71788)
Coverage Report: http://coverage.selectdb-in.cc/coverage/d91ce9bd594e619186863eabc9209bec707479ff_d91ce9bd594e619186863eabc9209bec707479ff/report/index.html

@doris-robot

Copy link
Copy Markdown

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.78 seconds
stream load tsv: 572 seconds loaded 74807831229 Bytes, about 124 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 30 seconds loaded 861443392 Bytes, about 27 MB/s
insert into select: 29.1 seconds inserted 10000000 Rows, about 343K ops/s
storage size: 17162363337 Bytes

Comment threadbe/src/olap/compaction.cpp

@xiaokangxiaokang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Oct 23, 2023
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@airborne12airborne12 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xiaokang
xiaokang merged commit 005a363 into apache:masterOct 26, 2023
@qidaye
qidaye deleted the index_compaction_checks branch October 26, 2023 03:35
@xiaokangxiaokang mentioned this pull request Dec 4, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.dev/2.0.3-mergedreviewedusercaseImportant user case type label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@qidaye@doris-robot@xiaokang@airborne12@wm1581066